From 1a3651693517332c0c15111b871c65f2411a35ae Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 3 Oct 2005 23:39:59 +0000 Subject: r10695: strupper() of NULL should be NULL, not panic. Andrew Bartlett (This used to be commit b1bcc0dc0b3c6d4d931100dee21ba16cb5521978) --- source4/lib/util_str.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source4/lib/util_str.c b/source4/lib/util_str.c index 685cc52c65..ba952df9f6 100644 --- a/source4/lib/util_str.c +++ b/source4/lib/util_str.c @@ -705,6 +705,10 @@ char *strupper_talloc(TALLOC_CTX *ctx, const char *src) { size_t size=0; char *dest; + + if (!src) { + return NULL; + } /* this takes advantage of the fact that upper/lower can't change the length of a character by more than 1 byte */ -- cgit