diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index b4ec6bcf..66c89281 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -7615,7 +7615,11 @@ END_TEST /* Exercises a particular string pool growth path */ START_TEST(test_ns_extremely_long_prefix) { - const char *text = + /* C99 compilers are only required to support 4095-character + * strings, so the following needs to be split in two to be safe + * for all compilers. + */ + const char *text1 = "" ""; - if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), + if (_XML_Parse_SINGLE_BYTES(parser, text1, strlen(text1), XML_FALSE) == XML_STATUS_ERROR) xml_failure(parser); + if (_XML_Parse_SINGLE_BYTES(parser, text2, strlen(text2), + XML_TRUE) == XML_STATUS_ERROR) + xml_failure(parser); } END_TEST