X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Falloc_str.c;h=a9543c5b96d459c86aefa489502f0e5683244ee0;hb=521609b4721376161eabe89c9431aa221e87e263;hp=5b3d839253b1e5b7c0f25a3adb6d5ea395eb4332;hpb=031256ad2e123eec58521f8e3eb9496c197641d2;p=libucw.git diff --git a/ucw/alloc_str.c b/ucw/alloc_str.c index 5b3d8392..a9543c5b 100644 --- a/ucw/alloc_str.c +++ b/ucw/alloc_str.c @@ -14,6 +14,8 @@ char * xstrdup(const char *s) { + if (!s) + return NULL; uns l = strlen(s) + 1; return memcpy(xmalloc(l), s, l); }