1 Fix regression caused by fix for CVE-2016-0718 when building with -DXML_UNICODE.
5 https://sourceforge.net/p/expat/bugs/539/
7 Patch copied from upstream source repository:
9 https://sourceforge.net/p/expat/code_git/ci/af507cef2c93cb8d40062a0abe43a4f4e9158fb2/
11 From af507cef2c93cb8d40062a0abe43a4f4e9158fb2 Mon Sep 17 00:00:00 2001
12 From: Sebastian Pipping <sebastian@pipping.org>
13 Date: Sun, 17 Jul 2016 20:22:29 +0200
14 Subject: [PATCH 1/2] Fix regression bug #539 (needs -DXML_UNICODE)
16 Thanks to Andy Wang and Karl Waclawek!
18 expat/lib/xmlparse.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
21 diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c
22 index b308e67..0d5dd7b 100644
25 @@ -2468,7 +2468,7 @@ doContent(XML_Parser parser,
27 (ICHAR **)&toPtr, (ICHAR *)tag->bufEnd - 1);
28 convLen = (int)(toPtr - (XML_Char *)tag->buf);
29 - if ((convert_res == XML_CONVERT_COMPLETED) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
30 + if ((fromPtr >= rawNameEnd) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
31 tag->name.strLen = convLen;