summaryrefslogtreecommitdiffstats
path: root/extensions
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 /extensions
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 'extensions')
-rw-r--r--extensions/auth/nsHttpNegotiateAuth.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/extensions/auth/nsHttpNegotiateAuth.cpp b/extensions/auth/nsHttpNegotiateAuth.cpp
index adea54b85..8b6be915e 100644
--- a/extensions/auth/nsHttpNegotiateAuth.cpp
+++ b/extensions/auth/nsHttpNegotiateAuth.cpp
@@ -530,8 +530,11 @@ nsHttpNegotiateAuth::GenerateCredentials(nsIHttpAuthenticableChannel *authChanne
challenge++;
len = strlen(challenge);
+ if (!len)
+ return NS_ERROR_UNEXPECTED;
+
// strip off any padding (see bug 230351)
- while (challenge[len - 1] == '=')
+ while (len && challenge[len - 1] == '=')
len--;
//