diff options
author | Andreas Buhr <andreas.buhr@qt.io> | 2020-11-19 17:33:00 +0100 |
---|---|---|
committer | Andreas Buhr <andreas.buhr@qt.io> | 2020-11-20 14:42:32 +0100 |
commit | 756c4faccbe3ae583193e8706dc0c99d39d3dcb8 (patch) | |
tree | 97c3a1d2b53975764d37dfb8681ceb25beb330dd /tests/auto/corelib | |
parent | 1a2e2921d268f09b6cb5ca91c85614192b8e2e0e (diff) |
Add unit test reproducing integer overflow in QDateTime::fromString
Task-number: QTBUG-88656
Change-Id: I05b9ad1dfa9b3f02480d8e99a523371342bdba9b
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r-- | tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp index 7e56421543..44916e96f5 100644 --- a/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp @@ -2802,6 +2802,11 @@ void tst_QDateTime::fromStringStringFormat_data() QTest::newRow("QTBUG-84349: positive sign in month") << QStringLiteral("9922+221102233Z") << QStringLiteral("yyyyMMddHHmmsst") << QDateTime(); + + // fuzzer test + QTest::newRow("integer overflow found by fuzzer") + << QStringLiteral("EEE1200000MUB") << QStringLiteral("t") + << QDateTime(); } void tst_QDateTime::fromStringStringFormat() |