h++;
continue;
}
+ /* Check for substrings before memcmp() */
if ((h + fl == e || vct_issepctl(h[fl])) &&
!memcmp(h, field, fl)) {
/* got it */
h += fl;
if (ptr != NULL) {
- while (vct_issp(*h))
+ /* Skip whitespace, looking for '=' */
+ while (*h && vct_issp(*h))
h++;
if (*h == '=') {
h++;
- while (vct_issp(*h))
+ while (*h && vct_issp(*h))
h++;
*ptr = h;
}
}
return (1);
}
+ /* Skip token */
while (*h && !vct_issepctl(*h))
h++;
}
retirement_age = INT_MAX;
u1 = u2 = 0;
- if (http_GetHdrField(hp, H_Cache_Control, "s-maxage", &p) ||
- http_GetHdrField(hp, H_Cache_Control, "max-age", &p)) {
- AN(p);
+ if ((http_GetHdrField(hp, H_Cache_Control, "s-maxage", &p) ||
+ http_GetHdrField(hp, H_Cache_Control, "max-age", &p)) &&
+ p != NULL {
u1 = strtoul(p, NULL, 0);
u2 = 0;
if (http_GetHdr(hp, H_Age, &p)) {