From 8cd56990480c7236dfdd7eb2f2954a2653686949 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Thu, 27 Mar 2003 20:44:09 +0000 Subject: [PATCH] Don't pass NULL in as a flags argument to libfetch's fetchGetURL() as this can result in a NULL pointer deference when parsing the flags later. This change fixes "pkg_add -r" on 5.0-CURRENT for me; not quite clear how the problem was introduced. --- usr.sbin/pkg_install/lib/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pkg_install/lib/url.c b/usr.sbin/pkg_install/lib/url.c index 5ee33f367477..f43e464c4d5c 100644 --- a/usr.sbin/pkg_install/lib/url.c +++ b/usr.sbin/pkg_install/lib/url.c @@ -89,7 +89,7 @@ fileGetURL(const char *base, const char *spec) else strcpy(fname, spec); - if ((ftp = fetchGetURL(fname, Verbose ? "v" : NULL)) == NULL) { + if ((ftp = fetchGetURL(fname, Verbose ? "v" : "")) == NULL) { printf("Error: FTP Unable to get %s: %s\n", fname, fetchLastErrString); return NULL;