diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2003-05-20 12:22:41 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2003-05-20 12:22:41 +0000 |
commit | 0e0f37a35c06ca0785e3909c373f9da75f5e9d72 (patch) | |
tree | b5bb3f3be4ad37d3ab4db49500de9e8bca0e404b /parserInternals.c | |
parent | fb7f0845730379ec02d1cf73f4d6447930c3a4a8 (diff) | |
download | libxml2-0e0f37a35c06ca0785e3909c373f9da75f5e9d72.tar.gz |
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
Diffstat (limited to 'parserInternals.c')
-rw-r--r-- | parserInternals.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/parserInternals.c b/parserInternals.c index 1e2777d7..8e57cdaa 100644 --- a/parserInternals.c +++ b/parserInternals.c @@ -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) |