summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <[email protected]>2024-08-01 13:25:28 +0200
committerMarc Mutz <[email protected]>2024-08-03 05:09:25 +0000
commit57eff5b092dbd692594125edc70d3efd898660ea (patch)
treeffd6697da05eee9ddf0b9df279fb6c3af473b8af
parentfdfb360f4f60cbdb9ce7f29f424dad70f0679b17 (diff)
QtTest: Fix format error in _q_compareSequence()
Commit 63295f43e70955a194602a7acf39013f124e14b7 changed the size: placeholders to %lld, but wrapped only one of the arguments in qlonglong. This causes 32-bit builds to read past the end of the expectedSize variable. Fix by wrapping the other, too. Pick-to: 6.8 6.7 6.5 6.2 5.15 Change-Id: I9c23ab589c8895e8f038fb508e18ac3006fa4f8f Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Ivan Solovev <[email protected]>
-rw-r--r--src/testlib/qtest.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h
index 9b8f12ec545..f3802d548b9 100644
--- a/src/testlib/qtest.h
+++ b/src/testlib/qtest.h
@@ -59,7 +59,7 @@ bool _q_compareSequence(ActualIterator actualIt, ActualIterator actualEnd,
" Actual (%s) size: %lld\n"
" Expected (%s) size: %lld",
actual, qlonglong(actualSize),
- expected, expectedSize);
+ expected, qlonglong(expectedSize));
}
for (auto expectedIt = expectedBegin; isOk && expectedIt < expectedEnd; ++actualIt, ++expectedIt) {