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
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-03-09 23:56:44 +0300
committerChristopher Faylor <me@cgf.cx>2005-03-09 23:56:44 +0300
commitb364b3986758d395ab97117a9543dc816fc34bd2 (patch)
treef41f8dafdaa8dc12e6b5bed70d4cfd47adaacd81
parentf5394c956013e131600375256758c8530096538f (diff)
* net.cc (dup_ent): Avoid dereferencing a null pointer in a debug_printf.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/net.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 9c2f7bcae..112e84c7d 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
2005-03-09 Christopher Faylor <cgf@timesys.com>
+ * net.cc (dup_ent): Avoid dereferencing a null pointer in a debug_printf.
+
+2005-03-09 Christopher Faylor <cgf@timesys.com>
+
* path.cc (path_conv::check): Treat ENOSHARE similarly to ENOENT when
determining if there was a problem with a symlink.
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index 3fee9eb91..ed52807d6 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -389,7 +389,7 @@ dup_ent (void *old, void *src0, struct_type type)
if (old)
{
debug_printf ("freeing old %sent structure \"%s\" %p\n", entnames[type],
- ((unionent *) old)->name, old);
+ old ? ((unionent *) old)->name : "<null!>", old);
free (old);
}