* miscfuncs.cc (__import_address): Avoid NULL explicitly.

This commit is contained in:
Christopher Faylor 2013-01-23 02:06:44 +00:00
parent 9c4478df47
commit 1fc747f37a
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2013-01-22 Christopher Faylor <me.cygwin2013@cgf.cx>
* miscfuncs.cc (__import_address): Avoid NULL explicitly.
2013-01-22 Christopher Faylor <me.cygwin2013@cgf.cx>
* miscfuncs.cc (__import_address): Avoid treating random instructions

View File

@ -437,7 +437,7 @@ slashify (const char *src, char *dst, bool trailing_slash_p)
void * __reg1
__import_address (void *imp)
{
if (*((uint16_t *) imp) != 0x25ff)
if (!imp || *((uint16_t *) imp) != 0x25ff)
return NULL;
myfault efault;
if (efault.faulted ())