From 7ed8bb1d43853a2b15af4d4a4a439ca833a0de6c Mon Sep 17 00:00:00 2001 From: rwatson Date: Thu, 27 Mar 2003 20:44:09 +0000 Subject: 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 5ee33f3..f43e464 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; -- cgit v1.1