mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 11:02:44 +00:00
Avoid a segfault (due to an unitialized pointer) when parsing URLs that have
no scheme or host part.
This commit is contained in:
parent
937c4dfa08
commit
1ba8497660
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69975
@ -314,6 +314,8 @@ fetchParseURL(char *URL)
|
||||
*/
|
||||
if (URL[1] == '/')
|
||||
URL = (p += 2);
|
||||
} else {
|
||||
p = URL;
|
||||
}
|
||||
if (!*URL || *URL == '/')
|
||||
goto nohost;
|
||||
|
Loading…
Reference in New Issue
Block a user