]> granicus.if.org Git - libexpat/commitdiff
Test partial UTF-8 characters in IGNORE section
authorRhodri James <rhodri@kynesim.co.uk>
Mon, 27 Feb 2017 17:58:29 +0000 (17:58 +0000)
committerSebastian Pipping <sebastian@pipping.org>
Sat, 22 Jul 2017 19:25:24 +0000 (21:25 +0200)
expat/tests/runtests.c

index d56c60f0e3c41881bc47cd0c4c978cfa89b89bbf..9117e666741499513cd82c6562910ee51565d157 100644 (file)
@@ -3561,6 +3561,13 @@ START_TEST(test_bad_ignore_section)
             NULL,
             XML_ERROR_INVALID_TOKEN
         },
+        {
+            /* FIrst two bytes of a three-byte char */
+            "<![IGNORE[\xe2\x82",
+            "Partial XML character not faulted",
+            NULL,
+            XML_ERROR_PARTIAL_CHAR
+        },
         { NULL, NULL, NULL, XML_ERROR_NONE }
     };
     ExtFaults *fault;