From 0186023f4adebc5ff1bfc4ac4a3f3870d7dd68af Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Thu, 9 Jan 2020 22:35:03 +0100 Subject: Handle missing base64 challenge in NegotiateAuth and NTLMAuth. --- netwerk/protocol/http/nsHttpNTLMAuth.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'netwerk/protocol/http') diff --git a/netwerk/protocol/http/nsHttpNTLMAuth.cpp b/netwerk/protocol/http/nsHttpNTLMAuth.cpp index aa5b1f8f7..86bfcf4d1 100644 --- a/netwerk/protocol/http/nsHttpNTLMAuth.cpp +++ b/netwerk/protocol/http/nsHttpNTLMAuth.cpp @@ -486,8 +486,8 @@ nsHttpNTLMAuth::GenerateCredentials(nsIHttpAuthenticableChannel *authChannel, len -= 5; // strip off any padding (see bug 230351) - while (challenge[len - 1] == '=') - len--; + while (len && challenge[len - 1] == '=') + len--; // decode into the input secbuffer rv = Base64Decode(challenge, len, (char**)&inBuf, &inBufLen); -- cgit v1.2.3