From bc3ae300c5e6ab993549ce24ec681c4830741454 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 5 Oct 2023 22:15:06 +0200 Subject: [PATCH] tst_QStringApiSymmetry: add more invalid UTF-8 sequences These represent US-ASCII characters incorrectly encoded as a two-octet UTF-8 sequence. Pick-to: 6.6 6.5 Change-Id: I5b1d58066d08cf61583dabcd71dd2f3ac7a3585a Reviewed-by: Thiago Macieira --- .../corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp index 9664f2ef83..bb265971c7 100644 --- a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp +++ b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp @@ -3619,6 +3619,8 @@ void tst_QStringApiSymmetry::isValidUtf8_data() row = 0; QTest::addRow("overlong-%02d", row++) << QByteArray("\xc0\x00") << false; QTest::addRow("overlong-%02d", row++) << QByteArray("\xc1\xff") << false; + QTest::addRow("overlong-%02d", row++) << QByteArray("\xc1\xbf") << false; + QTest::addRow("overlong-%02d", row++) << QByteArray("\xc1\x01") << false; QTest::addRow("overlong-%02d", row++) << QByteArray("\xe0\x00\x00") << false; QTest::addRow("overlong-%02d", row++) << QByteArray("\xe0\xa0\x7f") << false; QTest::addRow("overlong-%02d", row++) << QByteArray("\xf0\x00\x00\x00") << false;