[master] silence coverity warning

This commit is contained in:
Evan Hunt
2016-03-05 19:50:42 -08:00
parent 7f9f0b9755
commit 868b3166b8

View File

@@ -401,12 +401,13 @@ have_header(isc_httpd_t *httpd, const char *header, const char *value,
if (cr != NULL && cr[1] == '\n')
cr++;
nl = strchr(h, '\n');
/* last header? */
if (cr == NULL && nl == NULL)
return(ISC_FALSE);
h = cr;
if (h == NULL || nl < h)
if (h == NULL || (nl != NULL && nl < h))
h = nl;
if (h == NULL)
return (ISC_FALSE);
h++;
continue;
}