svn commit: r201634 - in stable: 7/usr.bin/fetch 8/usr.bin/fetch
Ruslan Ermilov
ru at FreeBSD.org
Wed Jan 6 08:26:43 UTC 2010
Author: ru
Date: Wed Jan 6 08:26:43 2010
New Revision: 201634
URL: http://svn.freebsd.org/changeset/base/201634
Log:
MFC r201290: Treat an empty argument as an error, instead of
fetching the contents of the root directory.
Modified:
stable/7/usr.bin/fetch/fetch.c
Directory Properties:
stable/7/usr.bin/fetch/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/8/usr.bin/fetch/fetch.c
Directory Properties:
stable/8/usr.bin/fetch/ (props changed)
Modified: stable/7/usr.bin/fetch/fetch.c
==============================================================================
--- stable/7/usr.bin/fetch/fetch.c Wed Jan 6 08:18:49 2010 (r201633)
+++ stable/7/usr.bin/fetch/fetch.c Wed Jan 6 08:26:43 2010 (r201634)
@@ -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-stable
mailing list