Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2013-01-23 06:06:44 +0400
committerChristopher Faylor <me@cgf.cx>2013-01-23 06:06:44 +0400
commit1fc747f37ac6d74b617dddcb0153cc47f0d4fb4d (patch)
treef4e40601e217c71e371bbdc2b9314163c796061a /winsup
parent9c4478df471a04c898098afcc417260ad39b138c (diff)
* miscfuncs.cc (__import_address): Avoid NULL explicitly.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/miscfuncs.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 3bd365f85..48870ae1c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
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
as import jump.
* malloc_wrapper.cc (malloc_init): Remove comment about 64-bit.
diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc
index 4f9c9df9d..8e954b39f 100644
--- a/winsup/cygwin/miscfuncs.cc
+++ b/winsup/cygwin/miscfuncs.cc
@@ -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 ())