From: Christophe Jaillet Date: Fri, 4 Apr 2014 20:17:46 +0000 (+0000) Subject: Do not scan past the end of the buffer. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=769f04c9cf8d11a74674302f093b06e8b5213dd1;p=thirdparty%2Fapache%2Fhttpd.git Do not scan past the end of the buffer. If no terminating delimiter is found, just leave things as it is git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1584884 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_proxy_html.c b/modules/filters/mod_proxy_html.c index 081f37122a5..1d87f1106de 100644 --- a/modules/filters/mod_proxy_html.c +++ b/modules/filters/mod_proxy_html.c @@ -677,7 +677,10 @@ static meta *metafix(request_rec *r, const char *buf) while (*p && apr_isspace(*++p)); if ((*p == '\'') || (*p == '"')) { delim = *p++; - for (q = p; *q != delim; ++q); + for (q = p; *q && *q != delim; ++q); + /* No terminating delimiter found? Skip the boggus directive */ + if (*q != delim) + break; } else { for (q = p; *q && !apr_isspace(*q) && (*q != '>'); ++q); }