mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-28 00:21:53 +03:00
fixing Red Hat bug #91013 where xmllint was accepting an improper UTF8
* parserInternals.c: fixing Red Hat bug #91013 where xmllint was accepting an improper UTF8 sequence Daniel
This commit is contained in:
@ -1144,6 +1144,8 @@ xmlNextChar(xmlParserCtxtPtr ctxt)
|
||||
|
||||
c = *cur;
|
||||
if (c & 0x80) {
|
||||
if (c == 0xC0)
|
||||
goto encoding_error;
|
||||
if (cur[1] == 0)
|
||||
xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
|
||||
if ((cur[1] & 0xc0) != 0x80)
|
||||
@ -1290,6 +1292,8 @@ xmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
|
||||
|
||||
c = *cur;
|
||||
if (c & 0x80) {
|
||||
if (c == 0xC0)
|
||||
goto encoding_error;
|
||||
if (cur[1] == 0)
|
||||
xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
|
||||
if ((cur[1] & 0xc0) != 0x80)
|
||||
|
Reference in New Issue
Block a user