From: Amos Jeffries Date: Fri, 17 Jun 2011 13:05:21 +0000 (-0600) Subject: Fix segfault parsing digest auth realm X-Git-Tag: SQUID_3_1_12_3~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45d67a0cede46be5dafa08b8c1875034c7961dca;p=thirdparty%2Fsquid.git Fix segfault parsing digest auth realm Also enact a TODO about Digest::Config constructor. --- diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/auth_digest.cc index f619160ddc..9be6af8858 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -940,22 +940,18 @@ AuthDigestConfig::done() safe_free(digestAuthRealm); } - -AuthDigestConfig::AuthDigestConfig() -{ - /* TODO: move into initialisation list */ - authenticateChildren = 5; - /* 5 minutes */ - nonceGCInterval = 5 * 60; - /* 30 minutes */ - noncemaxduration = 30 * 60; - /* 50 requests */ - noncemaxuses = 50; - /* Not strict nonce count behaviour */ - NonceStrictness = 0; - /* Verify nonce count */ - CheckNonceCount = 1; -} +AuthDigestConfig::AuthDigestConfig() : + authenticateChildren(5), + digestAuthRealm(NULL), + authenticate(NULL), + nonceGCInterval(5*60), + noncemaxduration(30*60), + noncemaxuses(50), + NonceStrictness(0), + CheckNonceCount(1), + PostWorkaround(0), + utf8(0) +{} void AuthDigestConfig::parse(AuthConfig * scheme, int n_configured, char *param_str)