diff options
Diffstat (limited to 'xmalloc.c')
-rw-r--r-- | xmalloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -63,7 +63,8 @@ char *strdup(const char *s) { char *p; p = (char *) malloc(strlen(s)+1); - strcpy(p,s); + if (p) + strcpy(p,s); return p; } #endif /* !HAVE_STRDUP */ |