diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2020-12-09 10:32:03 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2020-12-09 12:40:31 -0800 |
commit | 4a1091f489ac3fee9efd81b0f1ffca4275725610 (patch) | |
tree | 82ff75f0961dedbbea0b24ef2c3201dd7fb4f76c /tests/auto/corelib | |
parent | 2bed336599dddd7e7c3cef73107c5ca3e6d6ab27 (diff) |
QUrl: fix parsing of empty IPv6 addresses
There's an assertion. Found by Google fuzz scan of CBOR data.
Pick-to: 6.0 5.15
Change-Id: I55083c2909f64a1f8868fffd164f1ff3af71605b
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r-- | tests/auto/corelib/io/qurl/tst_qurl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index 45a311230f..e46b6eb329 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -1909,6 +1909,8 @@ void tst_QUrl::ipv6_data() QTest::addColumn<bool>("isValid"); QTest::addColumn<QString>("output"); + QTest::newRow("empty") << "//[]" << false << ""; + QTest::newRow("case 1") << QString::fromLatin1("//[56:56:56:56:56:56:56:56]") << true << "//[56:56:56:56:56:56:56:56]"; QTest::newRow("case 2") << QString::fromLatin1("//[::56:56:56:56:56:56:56]") << true |