From 43ebeefe2aa8bfff7df83ba8bdbffe61a3c98bc9 Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Mon, 26 Jun 2006 00:05:15 +0000 Subject: [PATCH] Bug 326528: fix out-of-bound error in pref reading code, r+sr=darin git-svn-id: svn://10.0.0.236/trunk@200845 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/extensions/auth/nsHttpNegotiateAuth.cpp | 2 +- mozilla/netwerk/protocol/http/src/nsHttpNTLMAuth.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/extensions/auth/nsHttpNegotiateAuth.cpp b/mozilla/extensions/auth/nsHttpNegotiateAuth.cpp index b7404fc68f1..2b74954a43d 100644 --- a/mozilla/extensions/auth/nsHttpNegotiateAuth.cpp +++ b/mozilla/extensions/auth/nsHttpNegotiateAuth.cpp @@ -408,7 +408,7 @@ nsHttpNegotiateAuth::MatchesBaseURI(const nsCSubstring &matchScheme, // XXX this does not work for IPv6-literals const char *hostEnd = strchr(hostStart, ':'); - if (hostEnd && hostEnd <= baseEnd) { + if (hostEnd && hostEnd < baseEnd) { // the given port must match the parsed port exactly int port = atoi(hostEnd + 1); if (matchPort != (PRInt32) port) diff --git a/mozilla/netwerk/protocol/http/src/nsHttpNTLMAuth.cpp b/mozilla/netwerk/protocol/http/src/nsHttpNTLMAuth.cpp index 9c25334c0b3..ff5a6427b77 100644 --- a/mozilla/netwerk/protocol/http/src/nsHttpNTLMAuth.cpp +++ b/mozilla/netwerk/protocol/http/src/nsHttpNTLMAuth.cpp @@ -83,7 +83,7 @@ MatchesBaseURI(const nsCSubstring &matchScheme, // XXX this does not work for IPv6-literals const char *hostEnd = strchr(hostStart, ':'); - if (hostEnd && hostEnd <= baseEnd) { + if (hostEnd && hostEnd < baseEnd) { // the given port must match the parsed port exactly int port = atoi(hostEnd + 1); if (matchPort != (PRInt32) port)