]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2411: fakeauth_auth is crashing during NTLM auth
authorAmos Jeffries <amosjeffries@squid-cache.org>
Thu, 17 Jul 2008 10:51:59 +0000 (04:51 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Thu, 17 Jul 2008 10:51:59 +0000 (04:51 -0600)
A NULL abort test was missing from the Squid-3 version.

helpers/ntlm_auth/fakeauth/fakeauth_auth.c

index e557d0d9124a7a1ddb6202b42b0032cb2563000c..e30170a846e201fa7b8fe408e0a78a568cde2de0 100755 (executable)
@@ -299,9 +299,12 @@ ntlmDecodeAuth(struct ntlm_authenticate *auth, char *buf, size_t size)
     buf += (s - 1);
     *buf++ = '\\';             /* Using \ is more consistent with MS-proxy */
 
-    p = ntlmGetString(&auth->hdr, &auth->user, auth->flags);
+    if( (p = ntlmGetString(&auth->hdr, &auth->user, auth->flags)) == NULL)
+        return 1;
+
     if ((s = strlen(p) + 1) >= size)
        return 1;
+
     while (*p)
        *buf++ = (*p++);        //tolower