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:
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user