mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-03 17:54:33 +03:00
Test numbers before calling strncmp.
svn path=/trunk/netsurf/; revision=13107
This commit is contained in:
parent
d64e09aef7
commit
a4dc04e44a
@ -853,14 +853,13 @@ static nserror nsurl__create_from_section(const char const *url_s,
|
||||
1 : 0;
|
||||
sec_start = norm_start + colon - pegs->at +
|
||||
skip;
|
||||
if (url->scheme != NULL &&
|
||||
strncmp(lwc_string_data(
|
||||
url->scheme), "http",
|
||||
SLEN("http")) == 0 &&
|
||||
length -
|
||||
if (url->scheme != NULL && length -
|
||||
(colon - pegs->at + 1) == 2 &&
|
||||
*sec_start == '8' &&
|
||||
*(sec_start + 1) == '0') {
|
||||
*(sec_start + 1) == '0' &&
|
||||
strncmp(lwc_string_data(
|
||||
url->scheme), "http",
|
||||
SLEN("http")) == 0) {
|
||||
/* Scheme is http, and port is default
|
||||
* (80) */
|
||||
flags |= NSURL_F_NO_PORT;
|
||||
|
Loading…
Reference in New Issue
Block a user