]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Late-declare variable in ntlm_smb_lm_auth.cc (CID 1256169)
authorFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 21 Jul 2015 12:53:18 +0000 (14:53 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 21 Jul 2015 12:53:18 +0000 (14:53 +0200)
helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.cc

index 81deb9acbd04c0519fe637bc2ec9f7b3421c4733..8f3145de9416264944bd57a0f1a29fd7765ac0d1 100644 (file)
@@ -477,7 +477,6 @@ manage_request()
     ntlmhdr *fast_header;
     char buf[NTLM_BLOB_BUFFER_SIZE];
     char decoded[NTLM_BLOB_BUFFER_SIZE];
-    const char *ch;
     char *ch2, *cred = NULL;
 
     if (fgets(buf, NTLM_BLOB_BUFFER_SIZE, stdin) == NULL) {
@@ -489,7 +488,6 @@ manage_request()
     ch2 = (char*)memchr(buf, '\n', NTLM_BLOB_BUFFER_SIZE);  /* safer against overrun than strchr */
     if (ch2) {
         *ch2 = '\0';        /* terminate the string at newline. */
-        ch = ch2;
     }
     debug("ntlm authenticator. Got '%s' from Squid\n", buf);
 
@@ -628,7 +626,7 @@ manage_request()
     }
     if (memcmp(buf, "YR", 2) == 0) {    /* refresh-request */
         dc_disconnect();
-        ch = obtain_challenge();
+        const char *ch = obtain_challenge();
         /* Robert says we can afford to wait forever. I'll trust him on this
          * one */
         while (ch == NULL) {