1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-01 09:41:47 +03:00

- HTMLparser.c: fixed loop reported by Marc Sanfacon

Daniel
This commit is contained in:
Daniel Veillard
2001-03-03 10:04:57 +00:00
parent 2f36224e54
commit f9533d1457
3 changed files with 31 additions and 20 deletions

View File

@ -3322,8 +3322,8 @@ htmlParseContent(htmlParserCtxtPtr ctxt) {
return;
}
if ((xmlStrEqual(currentNode, BAD_CAST"script")) ||
(xmlStrEqual(currentNode, BAD_CAST"style"))) {
if ((CUR != 0) && ((xmlStrEqual(currentNode, BAD_CAST"script")) ||
(xmlStrEqual(currentNode, BAD_CAST"style")))) {
/*
* Handle SCRIPT/STYLE separately
*/
@ -3371,7 +3371,10 @@ htmlParseContent(htmlParserCtxtPtr ctxt) {
* Fourth : end of the resource
*/
else if (CUR == 0) {
int level = ctxt->nodeNr;
htmlAutoClose(ctxt, NULL);
if (level == ctxt->nodeNr)
break;
}
/*