Blame SOURCES/squid-3.5.20-CVE-2020-11945.patch

712647
diff --git a/src/auth/digest/Config.cc b/src/auth/digest/Config.cc
712647
index 4a9e762..1008ca6 100644
712647
--- a/src/auth/digest/Config.cc
712647
+++ b/src/auth/digest/Config.cc
712647
@@ -85,9 +85,6 @@ static void authenticateDigestNonceDelete(digest_nonce_h * nonce);
712647
 static void authenticateDigestNonceSetup(void);
712647
 static void authDigestNonceEncode(digest_nonce_h * nonce);
712647
 static void authDigestNonceLink(digest_nonce_h * nonce);
712647
-#if NOT_USED
712647
-static int authDigestNonceLinks(digest_nonce_h * nonce);
712647
-#endif
712647
 static void authDigestNonceUserUnlink(digest_nonce_h * nonce);
712647
 
712647
 static void
712647
@@ -276,21 +273,10 @@ authDigestNonceLink(digest_nonce_h * nonce)
712647
 {
712647
     assert(nonce != NULL);
712647
     ++nonce->references;
712647
+    assert(nonce->references != 0); // no overflows
712647
     debugs(29, 9, "nonce '" << nonce << "' now at '" << nonce->references << "'.");
712647
 }
712647
 
712647
-#if NOT_USED
712647
-static int
712647
-authDigestNonceLinks(digest_nonce_h * nonce)
712647
-{
712647
-    if (!nonce)
712647
-        return -1;
712647
-
712647
-    return nonce->references;
712647
-}
712647
-
712647
-#endif
712647
-
712647
 void
712647
 authDigestNonceUnlink(digest_nonce_h * nonce)
712647
 {
712647
diff --git a/src/auth/digest/Config.h b/src/auth/digest/Config.h
712647
index 8baeb31..c7b353d 100644
712647
--- a/src/auth/digest/Config.h
712647
+++ b/src/auth/digest/Config.h
712647
@@ -42,7 +42,7 @@ struct _digest_nonce_h : public hash_link {
712647
     /* number of uses we've seen of this nonce */
712647
     unsigned long nc;
712647
     /* reference count */
712647
-    short references;
712647
+    uint64_t references;
712647
     /* the auth_user this nonce has been tied to */
712647
     Auth::Digest::User *user;
712647
     /* has this nonce been invalidated ? */