From: robertc <> Date: Sun, 2 Feb 2003 20:35:53 +0000 (+0000) Subject: Summary: Ensure that optional authscheme methods are NULL'd if realloc returns non... X-Git-Tag: SQUID_3_0_PRE1~403 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8d25251af6d9203156f0def3760daf243c9592fe;p=thirdparty%2Fsquid.git Summary: Ensure that optional authscheme methods are NULL'd if realloc returns non-zero'd memory. Keywords: Ensure that optional authscheme methods are NULL'd if realloc returns non-zero'd memory. --- diff --git a/src/authenticate.cc b/src/authenticate.cc index 39a6a3d442..4ab64124e0 100644 --- a/src/authenticate.cc +++ b/src/authenticate.cc @@ -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(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 */