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
This commit is contained in:
gavin%gavinsharp.com 2006-06-26 00:05:15 +00:00
parent 1ebafc2bfa
commit 43ebeefe2a
2 changed files with 2 additions and 2 deletions

View File

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

View File

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