1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

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.
This commit is contained in:
Robert Watson 2003-03-27 20:44:09 +00:00
parent 8ee63f6eae
commit 8cd5699048
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112722

View File

@ -89,7 +89,7 @@ fileGetURL(const char *base, const char *spec)
else else
strcpy(fname, spec); 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", printf("Error: FTP Unable to get %s: %s\n",
fname, fetchLastErrString); fname, fetchLastErrString);
return NULL; return NULL;