mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Fix two unchecked pointer dereferences in the libobjc2 compatibility
code, which could cause crashes when attempting to invoke a selector which is not implemented by the target. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31384 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e50b5feb40
commit
fdd4894770
2 changed files with 9 additions and 2 deletions
|
@ -675,13 +675,13 @@ method_getArgumentType(Method method,
|
|||
IMP
|
||||
method_getImplementation(Method method)
|
||||
{
|
||||
return (IMP) method->method_imp;
|
||||
return method ? (IMP) method->method_imp : (IMP) 0;
|
||||
}
|
||||
|
||||
SEL
|
||||
method_getName(Method method)
|
||||
{
|
||||
return method->method_name;
|
||||
return method ? method->method_name : (SEL) 0;
|
||||
}
|
||||
|
||||
unsigned
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue