Don't dereference flags if NULL (see http.c rev 1.87)

This commit is contained in:
Dag-Erling Smørgrav 2003-03-29 15:15:38 +00:00
parent dfcf25920b
commit 762892c047
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112797

View file

@ -701,7 +701,7 @@ _http_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("HTTP_PROXY")) || (p = getenv("http_proxy"))) &&
(purl = fetchParseURL(p))) {