From d459a6b0e0d4f128caceaafe981ecf374bb3e420 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 5 Jul 2016 20:00:17 +0200 Subject: fix calculations of worst-case size requirements for token buffer Change-Id: I3aa4c736acec44f95a0a33c7baae9276568f684f Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- tests/auto/tools/qmakelib/parsertest.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/auto/tools/qmakelib') diff --git a/tests/auto/tools/qmakelib/parsertest.cpp b/tests/auto/tools/qmakelib/parsertest.cpp index a7b7431a98..7e6757a2ff 100644 --- a/tests/auto/tools/qmakelib/parsertest.cpp +++ b/tests/auto/tools/qmakelib/parsertest.cpp @@ -1872,6 +1872,13 @@ void tst_qmakelib::addParseAbuse() /* 24 */ /* else branch */ << I(0)) << "in:1: OR operator without prior condition." << false; + + // Token buffer overflow. Verify with Valgrind or asan. + QTest::newRow("QTCREATORBUG-16508") + << "a{b{c{d{" + << TS() + << "in:2: Missing closing brace(s)." + << false; } void tst_qmakelib::proParser_data() -- cgit v1.2.3