]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Summary: Ensure that optional authscheme methods are NULL'd if realloc returns non...
authorrobertc <>
Sun, 2 Feb 2003 20:35:53 +0000 (20:35 +0000)
committerrobertc <>
Sun, 2 Feb 2003 20:35:53 +0000 (20:35 +0000)
Keywords:

Ensure that optional authscheme methods are NULL'd if realloc returns non-zero'd memory.

src/authenticate.cc

index 39a6a3d44274b8526f5b863b55bb373c6b8729fa..4ab64124e0a94f78d6fde8a3ee039085dd9b9899 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: authenticate.cc,v 1.49 2003/01/23 00:37:16 robertc Exp $
+ * $Id: authenticate.cc,v 1.50 2003/02/02 13:35:53 robertc Exp $
  *
  * DEBUG: section 29    Authenticator
  * AUTHOR:  Robert Collins
@@ -1055,6 +1055,7 @@ authSchemeAdd(const char *type, AUTHSSETUP * setup)
     }
     /* add the new type */
     authscheme_list = static_cast<authscheme_entry_t *>(xrealloc(authscheme_list, (i + 2) * sizeof(authscheme_entry_t)));
+    memset(&authscheme_list[i], 0, sizeof(authscheme_entry_t));
     memset(&authscheme_list[i + 1], 0, sizeof(authscheme_entry_t));
     authscheme_list[i].typestr = type;
     /* Call the scheme module to set up capabilities and initialize any global data */