]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix segfault parsing digest auth realm
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 13 Jun 2011 10:32:41 +0000 (22:32 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 13 Jun 2011 10:32:41 +0000 (22:32 +1200)
Also enact a TODO about Digest::Config constructor.

src/auth/digest/auth_digest.cc

index ed8bafd4b1dc3b0906ca7a77947065d786cc50a5..6da17d5e30e84808fbbbd0ef23806bb6dd5ef23e 100644 (file)
@@ -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)