summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-10-31 22:23:02 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-10-31 22:23:02 +0000
commit3ecf3c1eaf81c833f6ee231871fc0dd0f7d003b1 (patch)
tree266346aec01dd44855e336101b763ad0daafeca5 /utils
parenta4dc04e44a993e109eb7db7a8a9fc05c41ec7cc3 (diff)
downloadnetsurf-3ecf3c1eaf81c833f6ee231871fc0dd0f7d003b1.tar.gz
netsurf-3ecf3c1eaf81c833f6ee231871fc0dd0f7d003b1.tar.bz2
Fix empty port separator and redundant port removal when credentials are present.
svn path=/trunk/netsurf/; revision=13108
Diffstat (limited to 'utils')
-rw-r--r--utils/nsurl.c4
1 files changed, 2 insertions, 2 deletions
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;