From 3ecf3c1eaf81c833f6ee231871fc0dd0f7d003b1 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 31 Oct 2011 22:23:02 +0000 Subject: Fix empty port separator and redundant port removal when credentials are present. svn path=/trunk/netsurf/; revision=13108 --- utils/nsurl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/nsurl.c b/utils/nsurl.c index 306f442b6..2133f3911 100644 --- a/utils/nsurl.c +++ b/utils/nsurl.c @@ -854,7 +854,7 @@ static nserror nsurl__create_from_section(const char const *url_s, sec_start = norm_start + colon - pegs->at + skip; if (url->scheme != NULL && length - - (colon - pegs->at + 1) == 2 && + (colon - pegs->at + skip) == 2 && *sec_start == '8' && *(sec_start + 1) == '0' && strncmp(lwc_string_data( @@ -865,7 +865,7 @@ static nserror nsurl__create_from_section(const char const *url_s, flags |= NSURL_F_NO_PORT; } - if (length - (colon - pegs->at + 1) <= 0) { + if (length - (colon - pegs->at + skip) <= 0) { /* No space for a port after the colon */ flags |= NSURL_F_NO_PORT; -- cgit v1.2.3