diff options
Diffstat (limited to 'extensions/auth')
-rw-r--r-- | extensions/auth/nsHttpNegotiateAuth.cpp | 5 |
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--; // |