OSDN Git Service

* net.cc (dup_ent): Avoid dereferencing a null pointer in a debug_printf.
authorcgf <cgf>
Wed, 9 Mar 2005 20:56:44 +0000 (20:56 +0000)
committercgf <cgf>
Wed, 9 Mar 2005 20:56:44 +0000 (20:56 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/net.cc

index 9c2f7bc..112e84c 100644 (file)
@@ -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.
 
index 3fee9eb..ed52807 100644 (file)
@@ -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);
     }