mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-02-14 13:58:27 +03:00
Fix HTML parsing with 0 character in CDATA
* HTMLparser.c: 0 before the end of the input need some special case handling, raise the error and return a space instead
This commit is contained in:
parent
472b1e1150
commit
856c668c1a
@ -425,6 +425,13 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
|
||||
}
|
||||
return(val);
|
||||
} else {
|
||||
if ((*ctxt->input->cur == 0) &&
|
||||
(ctxt->input->cur < ctxt->input->end)) {
|
||||
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
|
||||
"Char 0x%X out of allowed range\n", 0);
|
||||
*len = 1;
|
||||
return(' ');
|
||||
}
|
||||
/* 1-byte code */
|
||||
*len = 1;
|
||||
return((int) *ctxt->input->cur);
|
||||
|
Loading…
x
Reference in New Issue
Block a user