1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-28 00:21:53 +03:00

fixed problem with comments reported by Nick Kew added routines

* HTMLparser.c: fixed problem with comments reported by Nick Kew
* encoding.c: added routines xmlUTF8Size and xmlUTF8Charcmp for
  some future cleanup of UTF8 handling
This commit is contained in:
William M. Brack
2003-07-29 04:28:04 +00:00
parent 9deb242b55
commit 4a557d97bf
4 changed files with 59 additions and 5 deletions

View File

@ -4358,10 +4358,11 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first,
(buf[base + 2] == '-') && (buf[base + 3] == '-')) {
incomment = 1;
}
/* do not increment base, some people use <!--> */
/* do not increment past <!, some people use <!--> */
base += 2;
}
if (incomment) {
if (base + 3 < len)
if (base + 3 > len)
return(-1);
if ((buf[base] == '-') && (buf[base + 1] == '-') &&
(buf[base + 2] == '>')) {