From: hno <> Date: Sat, 4 Sep 2004 03:25:29 +0000 (+0000) Subject: Bug #1031: Digest authentication crash X-Git-Tag: SQUID_3_0_PRE4~1063 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=778c696f049220ed47abc277c759dcbf068724a1;p=thirdparty%2Fsquid.git Bug #1031: Digest authentication crash --- diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/auth_digest.cc index c3e3a40802..f70967b885 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -1,6 +1,6 @@ /* - * $Id: auth_digest.cc,v 1.34 2004/08/30 05:12:32 robertc Exp $ + * $Id: auth_digest.cc,v 1.35 2004/09/03 21:25:29 hno Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Robert Collins @@ -821,7 +821,7 @@ authenticateDigestHandleReply(void *data, char *reply) if ((t = strchr(reply, ' '))) *t = '\0'; - if (*reply == '\0') + if (*reply == '\0' || *reply == '\n') reply = NULL; } @@ -833,7 +833,7 @@ authenticateDigestHandleReply(void *data, char *reply) if (reply && (strncasecmp(reply, "ERR", 3) == 0)) digest_request->credentials(AuthDigestUserRequest::Failed); - else { + else if (reply) { CvtBin(reply, digest_user->HA1); digest_user->HA1created = 1; }