1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +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

@ -1,3 +1,8 @@
Tue May 20 14:21:23 CEST 2003 Daniel Veillard <daniel@veillard.com>
* parserInternals.c: fixing Red Hat bug #91013 where xmllint was
accepting an improper UTF8 sequence
Sat May 17 12:53:11 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com> Sat May 17 12:53:11 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
* threads.c: applied the patch from St<53>phane Bidoul for getting * threads.c: applied the patch from St<53>phane Bidoul for getting

View File

@ -1144,6 +1144,8 @@ xmlNextChar(xmlParserCtxtPtr ctxt)
c = *cur; c = *cur;
if (c & 0x80) { if (c & 0x80) {
if (c == 0xC0)
goto encoding_error;
if (cur[1] == 0) if (cur[1] == 0)
xmlParserInputGrow(ctxt->input, INPUT_CHUNK); xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
if ((cur[1] & 0xc0) != 0x80) if ((cur[1] & 0xc0) != 0x80)
@ -1290,6 +1292,8 @@ xmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
c = *cur; c = *cur;
if (c & 0x80) { if (c & 0x80) {
if (c == 0xC0)
goto encoding_error;
if (cur[1] == 0) if (cur[1] == 0)
xmlParserInputGrow(ctxt->input, INPUT_CHUNK); xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
if ((cur[1] & 0xc0) != 0x80) if ((cur[1] & 0xc0) != 0x80)