mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 22:41:30 +03:00
Don't let it read off the front of empty relative URLs.
This commit is contained in:
parent
541b87ec9b
commit
3d337642bd
@ -454,9 +454,9 @@ static void nsurl__get_string_markers(const char * const url_s,
|
||||
/* We got to the end of url_s.
|
||||
* Need to skip back over trailing whitespace to find end of URL */
|
||||
pos--;
|
||||
if (isspace(*pos)) {
|
||||
if (pos >= url_s && isspace(*pos)) {
|
||||
trailing_whitespace = true;
|
||||
while (isspace(*pos))
|
||||
while (pos >= url_s && isspace(*pos))
|
||||
pos--;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user