From c365fa49d85810c6ad09bb5f43b5081cd7543bf1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 19 Dec 2016 13:50:17 +0100 Subject: fix out-of-bounds access on trailing percent sign in tr() argument tr() recognizes %n and %Ln. it offers no way to escape lone percent signs, which implies that they must be interpreted verbatim, which is what the code actually does. except that it would run off the end if the % appeared at the end of the string. Fixes: QTBUG-57171 Done-with: Mateusz Starzycki Change-Id: Icf81925c482be1ea66ec8daafb3e92ad17ea7fab Reviewed-by: Oswald Buddenhagen --- tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h') diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h index 105cca5174..2a23cf0751 100644 --- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h +++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h @@ -59,6 +59,7 @@ private slots: void applicationEventFilters_auxThread(); void threadedEventDelivery_data(); void threadedEventDelivery(); + void testTrWithPercantegeAtTheEnd(); #if QT_CONFIG(library) void addRemoveLibPaths(); #endif -- cgit v1.2.3