From 45d67a0cede46be5dafa08b8c1875034c7961dca Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Fri, 17 Jun 2011 07:05:21 -0600 Subject: [PATCH] Fix segfault parsing digest auth realm Also enact a TODO about Digest::Config constructor. --- src/auth/digest/auth_digest.cc | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) 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) -- 2.47.2