From: Amos Jeffries Date: Mon, 13 Jun 2011 10:32:41 +0000 (+1200) Subject: Fix segfault parsing digest auth realm X-Git-Tag: take08~55^2~141 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d13b829b93778f6a7e60fa2418ae5fa3b70704de;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 ed8bafd4b1..6da17d5e30 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -629,20 +629,16 @@ Auth::Digest::Config::done() safe_free(digestAuthRealm); } -Auth::Digest::Config::Config() -{ - /* TODO: move into initialisation list */ - /* 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; -} +Auth::Digest::Config::Config() : + digestAuthRealm(NULL), + nonceGCInterval(5*60), + noncemaxduration(30*60), + noncemaxuses(50), + NonceStrictness(0), + CheckNonceCount(1), + PostWorkaround(0), + utf8(0) +{} void Auth::Digest::Config::parse(Auth::Config * scheme, int n_configured, char *param_str)