1
0
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:
Daniel Veillard
2003-05-20 12:22:41 +00:00
parent fb7f084573
commit 0e0f37a35c
2 changed files with 9 additions and 0 deletions

View File

@ -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)