aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2010-01-06 08:26:43 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2010-01-06 08:26:43 +0000
commitc7fabb717622b35a5643cdecba354eb1c7a8c0fd (patch)
tree6ba40b3fb38797822c568411eaeff30cf479999d
parent64af44893a07704b8cf55e9afa856b18d7a445c4 (diff)
Notes
-rw-r--r--usr.bin/fetch/fetch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c
index 2512a2e8632c..7553bd8d1028 100644
--- a/usr.bin/fetch/fetch.c
+++ b/usr.bin/fetch/fetch.c
@@ -340,6 +340,11 @@ fetch(char *URL, const char *path)
fetchDebug = 1;
/* parse URL */
+ url = NULL;
+ if (*URL == '\0') {
+ warnx("empty URL");
+ goto failure;
+ }
if ((url = fetchParseURL(URL)) == NULL) {
warnx("%s: parse error", URL);
goto failure;