void-packages/srcpkgs/shadow/patches/xstrdup.patch

10 lines
261 B
Diff
Raw Normal View History

2012-02-14 07:49:16 +00:00
--- libmisc/xmalloc.c 2008-08-30 21:55:44.000000000 -0500
+++ libmisc/xmalloc.c.new 2008-08-30 21:55:36.000000000 -0500
@@ -61,5 +61,6 @@
char *xstrdup (const char *str)
{
+ if(str == NULL) return NULL;
return strcpy (xmalloc (strlen (str) + 1), str);
}