svn commit: r201290 - head/usr.bin/fetch
Ruslan Ermilov
ru at FreeBSD.org
Wed Dec 30 23:01:50 UTC 2009
Author: ru
Date: Wed Dec 30 23:01:49 2009
New Revision: 201290
URL: http://svn.freebsd.org/changeset/base/201290
Log:
Treat an empty argument as an error, instead of fetching the
contents of the root directory.
MFC after: 1 week
Modified:
head/usr.bin/fetch/fetch.c
Modified: head/usr.bin/fetch/fetch.c
==============================================================================
--- head/usr.bin/fetch/fetch.c Wed Dec 30 22:46:08 2009 (r201289)
+++ head/usr.bin/fetch/fetch.c Wed Dec 30 23:01:49 2009 (r201290)
@@ -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;
More information about the svn-src-head
mailing list