From: Theodore Tso Date: Tue, 9 Jun 1992 14:57:05 +0000 (+0000) Subject: strdup(0) now returns 0 X-Git-Tag: krb5-1.0-beta2~177 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ee23b6a28a7ece24c3498874ce71abe7518bc0b6;p=krb5.git strdup(0) now returns 0 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2285 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/posix/strdup.c b/src/lib/krb5/posix/strdup.c index ed2124164..838572090 100644 --- a/src/lib/krb5/posix/strdup.c +++ b/src/lib/krb5/posix/strdup.c @@ -31,6 +31,8 @@ strdup(str) int len; char *copy; + if (!str) + return((char *)0); len = strlen(str) + 1; if (!(copy = malloc((u_int)len))) return((char *)0);