mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +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 a new issue