diff options
author | des <des@FreeBSD.org> | 2000-12-13 11:21:09 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2000-12-13 11:21:09 +0000 |
commit | ae0af0d011fe1231b7c46f671bec0ebf92af084d (patch) | |
tree | 3dc4eafbb69b91aa5f49b4994f20d041090fb9ff /lib | |
parent | 635b424e75b70075159860177e730f0baae40646 (diff) | |
download | FreeBSD-src-ae0af0d011fe1231b7c46f671bec0ebf92af084d.zip FreeBSD-src-ae0af0d011fe1231b7c46f671bec0ebf92af084d.tar.gz |
Avoid a segfault (due to an unitialized pointer) when parsing URLs that have
no scheme or host part.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libfetch/fetch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c index b26cad0..bc803d5 100644 --- a/lib/libfetch/fetch.c +++ b/lib/libfetch/fetch.c @@ -314,6 +314,8 @@ fetchParseURL(char *URL) */ if (URL[1] == '/') URL = (p += 2); + } else { + p = URL; } if (!*URL || *URL == '/') goto nohost; |