summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/http/nsHttpNTLMAuth.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-01-09 22:35:03 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-01-11 13:46:18 +0100
commit38b00414148f4b013499b759ba3cd6cb72a15179 (patch)
tree164797490b3a541b1c4c67e79e04a73cf1c5cdb6 /netwerk/protocol/http/nsHttpNTLMAuth.cpp
parentd62795c868dff9a12a8868d09b3331cb8c4ad39b (diff)
downloadUXP-38b00414148f4b013499b759ba3cd6cb72a15179.tar
UXP-38b00414148f4b013499b759ba3cd6cb72a15179.tar.gz
UXP-38b00414148f4b013499b759ba3cd6cb72a15179.tar.lz
UXP-38b00414148f4b013499b759ba3cd6cb72a15179.tar.xz
UXP-38b00414148f4b013499b759ba3cd6cb72a15179.zip
Handle missing base64 challenge in NegotiateAuth and NTLMAuth.
Diffstat (limited to 'netwerk/protocol/http/nsHttpNTLMAuth.cpp')
-rw-r--r--netwerk/protocol/http/nsHttpNTLMAuth.cpp4
1 files changed, 2 insertions, 2 deletions
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);