]> granicus.if.org Git - libexpat/commitdiff
Fix external_entity_param() to work for UTF-16 builds
authorRhodri James <rhodri@kynesim.co.uk>
Tue, 22 Aug 2017 14:18:22 +0000 (15:18 +0100)
committerSebastian Pipping <sebastian@pipping.org>
Tue, 29 Aug 2017 21:13:13 +0000 (23:13 +0200)
expat/tests/runtests.c

index 5762b2acc4cfb7af028de4ebe8c275a38efd94f1..2166be950812513e27cfc2f187bf6819338854bf 100644 (file)
@@ -4263,14 +4263,14 @@ external_entity_param(XML_Parser parser,
     if (ext_parser == NULL)
         fail("Could not create external entity parser");
 
-    if (!strcmp(systemId, "004-1.ent")) {
+    if (!xcstrcmp(systemId, XCS("004-1.ent"))) {
         if (_XML_Parse_SINGLE_BYTES(ext_parser, text1, strlen(text1),
                                     XML_TRUE) != XML_STATUS_ERROR)
             fail("Inner DTD with invalid tag not rejected");
         if (XML_GetErrorCode(ext_parser) != XML_ERROR_EXTERNAL_ENTITY_HANDLING)
             xml_failure(ext_parser);
     }
-    else if (!strcmp(systemId, "004-2.ent")) {
+    else if (!xcstrcmp(systemId, XCS("004-2.ent"))) {
         if (_XML_Parse_SINGLE_BYTES(ext_parser, text2, strlen(text2),
                                     XML_TRUE) != XML_STATUS_ERROR)
             fail("Invalid tag in external param not rejected");