]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fixed NULL pointer passed to xstrdup in AuthUser::username().
authorwessels <>
Wed, 9 May 2007 21:26:12 +0000 (21:26 +0000)
committerwessels <>
Wed, 9 May 2007 21:26:12 +0000 (21:26 +0000)
src/AuthUser.cci

index 53e89b38e860037ecc9b2373f84de0552375f235..23da82652decca80f44b4ddb893abcba2dd3babe 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: AuthUser.cci,v 1.2 2007/05/09 08:26:57 wessels Exp $
+ * $Id: AuthUser.cci,v 1.3 2007/05/09 15:26:12 wessels Exp $
  *
  * DEBUG: section 29    Authenticator
  * AUTHOR:  Robert Collins
@@ -44,7 +44,7 @@ void
 AuthUser::username(char const*aString)
 {
     assert (!username() || !aString);
-    username_ = xstrdup(aString);
+    username_ = aString ? xstrdup(aString) : NULL;
 }
 
 void