diff --git a/src/ChangeLog b/src/ChangeLog index 19b49610..435026e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2014-11-12 Witchakorn Kamolpornwijit (tiny change) + + * html-parse.c (map_html_tags): Fix range check + 2014-11-11 Tim Ruehsen * openssl.c (ssl_init): Load CRL file given by --crl-file diff --git a/src/html-parse.c b/src/html-parse.c index f9418c70..b7a90dac 100644 --- a/src/html-parse.c +++ b/src/html-parse.c @@ -881,7 +881,7 @@ map_html_tags (const char *text, int size, if (*p == '!') { if (!(flags & MHT_STRICT_COMMENTS) - && p < end + 3 && p[1] == '-' && p[2] == '-') + && p + 3 < end && p[1] == '-' && p[2] == '-') { /* If strict comments are not enforced and if we know we're looking at a comment, simply look for the