The flags passed in to _ftp_get_proxy may be null

Approved by:	des, markm (mentor)(implicit)
This commit is contained in:
mtm 2003-03-19 21:39:00 +00:00
parent 59b094fe43
commit a65d822bcd

View File

@ -894,7 +894,7 @@ _ftp_get_proxy(const char *flags)
struct url *purl;
char *p;
if (strchr(flags, 'd') != NULL)
if (flags != NULL && strchr(flags, 'd') != NULL)
return (NULL);
if (((p = getenv("FTP_PROXY")) || (p = getenv("ftp_proxy")) ||
(p = getenv("HTTP_PROXY")) || (p = getenv("http_proxy"))) &&