summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2003-03-27 20:44:09 +0000
committerrwatson <rwatson@FreeBSD.org>2003-03-27 20:44:09 +0000
commit7ed8bb1d43853a2b15af4d4a4a439ca833a0de6c (patch)
tree54948b50604ac733c1dbc98de1948245003da6b3
parent72b54236b9dc86cd949887ef44e4c03630ad7dd3 (diff)
downloadFreeBSD-src-7ed8bb1d43853a2b15af4d4a4a439ca833a0de6c.zip
FreeBSD-src-7ed8bb1d43853a2b15af4d4a4a439ca833a0de6c.tar.gz
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.
-rw-r--r--usr.sbin/pkg_install/lib/url.c2
1 files changed, 1 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud