Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Jan 2010 08:26:43 +0000 (UTC)
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r201634 - in stable: 7/usr.bin/fetch 8/usr.bin/fetch
Message-ID:  <201001060826.o068QhnS066987@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001060826.o068QhnS066987>