xstrdup.patch 291 B

12345678910
  1. --- shadow-4.1.2.1/libmisc/xmalloc.c 2008-08-30 21:55:44.000000000 -0500
  2. +++ shadow-4.1.2.1/libmisc/xmalloc.c.new 2008-08-30 21:55:36.000000000 -0500
  3. @@ -61,5 +61,6 @@
  4. char *xstrdup (const char *str)
  5. {
  6. + if(str == NULL) return NULL;
  7. return strcpy (xmalloc (strlen (str) + 1), str);
  8. }