mirror of
https://github.com/GNOME/libxml2.git
synced 2025-04-06 19:20:23 +08:00
fix loop in HTMLparser.c
This commit is contained in:
parent
b1d62871db
commit
d28e48ab49
@ -1,3 +1,8 @@
|
||||
Sat Sep 22 10:00:00 HKT 2001 William Brack <wbrack@mmm.com.hk>
|
||||
|
||||
* HTMLparser.c: small enhancement to prevent loop on
|
||||
unrecognizable data
|
||||
|
||||
Fri Sep 21 11:45:53 CEST 2001 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* parserInternals.c: applying patch from bug #60757 this
|
||||
|
@ -3394,6 +3394,7 @@ htmlParseElement(htmlParserCtxtPtr ctxt) {
|
||||
htmlParserNodeInfo node_info;
|
||||
xmlChar *oldname;
|
||||
int depth = ctxt->nameNr;
|
||||
xmlChar *oldptr;
|
||||
|
||||
/* Capture start position */
|
||||
if (ctxt->record_info) {
|
||||
@ -3516,7 +3517,9 @@ htmlParseElement(htmlParserCtxtPtr ctxt) {
|
||||
currentNode = xmlStrdup(ctxt->name);
|
||||
depth = ctxt->nameNr;
|
||||
while (IS_CHAR(CUR)) {
|
||||
oldptr = ctxt->input->cur;
|
||||
htmlParseContent(ctxt);
|
||||
if (oldptr==ctxt->input->cur) break;
|
||||
if (ctxt->nameNr < depth) break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user