mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +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
|
@ -1,3 +1,10 @@
|
||||||
|
2010-09-20 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
|
* Source/ObjectiveC2/runtime.c (method_getImplementation,
|
||||||
|
method_getName): Fix unchecked pointer dereferences, which could
|
||||||
|
cause crashes when attempting to invoke a selector which is not
|
||||||
|
implemented by the target.
|
||||||
|
|
||||||
2010-09-19 Quentin Mathe <quentin.mathe@gmail.com>
|
2010-09-19 Quentin Mathe <quentin.mathe@gmail.com>
|
||||||
|
|
||||||
* Headers/Additions/GNUstepBase/preface.h.in:
|
* Headers/Additions/GNUstepBase/preface.h.in:
|
||||||
|
|
|
@ -675,13 +675,13 @@ method_getArgumentType(Method method,
|
||||||
IMP
|
IMP
|
||||||
method_getImplementation(Method method)
|
method_getImplementation(Method method)
|
||||||
{
|
{
|
||||||
return (IMP) method->method_imp;
|
return method ? (IMP) method->method_imp : (IMP) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SEL
|
SEL
|
||||||
method_getName(Method method)
|
method_getName(Method method)
|
||||||
{
|
{
|
||||||
return method->method_name;
|
return method ? method->method_name : (SEL) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue