1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

html: Don't check for valid XML characters

This commit is contained in:
Nick Wellnhofer
2024-09-09 02:01:19 +02:00
parent a6955c13c7
commit 9678163f54
7 changed files with 6 additions and 22 deletions

View File

@ -462,10 +462,6 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
if (val < 0x80)
goto encoding_error;
}
if (!IS_CHAR(val)) {
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
"Char 0x%X out of allowed range\n", val);
}
return(val);
}
@ -3414,12 +3410,8 @@ htmlParseComment(htmlParserCtxtPtr ctxt, int bogus) {
}
buf = tmp;
}
if (IS_CHAR(cur)) {
COPY_BUF(buf,len,cur);
} else {
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
"Invalid char in comment 0x%X\n", cur);
}
COPY_BUF(buf,len,cur);
if (len > maxLength) {
htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
"comment too long", NULL, NULL);