Handle missing base64 challenge in NegotiateAuth and NTLMAuth.

This commit is contained in:
wolfbeast 2020-01-09 22:35:03 +01:00 committed by Roy Tam
commit d43f7275d0
2 changed files with 6 additions and 3 deletions

View file

@ -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);