From f12f893931603bb6561149d813ca88b86e169ffd Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Tue, 10 Oct 2023 14:25:19 +0200 Subject: [PATCH] Verify that loading of invalid SVG files don't crash Also verify that we don't try to load invalid SVGs twice. Pick-to: 6.5 Task-number: QTBUG-117944 Change-Id: If3938384940112510d64a675f58c1e4e97e74986 Reviewed-by: Eskil Abrahamsen Blomfeldt (cherry picked from commit 7eb8f63915a470b89b96eb274252543a22e774a7) Reviewed-by: Qt Cherry-pick Bot --- diff --git a/tests/auto/qsvgplugin/CMakeLists.txt b/tests/auto/qsvgplugin/CMakeLists.txt index e678708..c913cd3 100644 --- a/tests/auto/qsvgplugin/CMakeLists.txt +++ b/tests/auto/qsvgplugin/CMakeLists.txt @@ -37,6 +37,9 @@ "simple_Utf16BE.svg" "simple_Utf32LE.svg" "simple_Utf32BE.svg" + "invalid_xml.svg" + "xml_not_svg.svg" + "invalid_then_valid.svg" ) qt_internal_add_resource(tst_qsvgplugin "resources" diff --git a/tests/auto/qsvgplugin/invalid_then_valid.svg b/tests/auto/qsvgplugin/invalid_then_valid.svg new file mode 100644 index 0000000..d09f598 --- /dev/null +++ b/tests/auto/qsvgplugin/invalid_then_valid.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/qsvgplugin/invalid_xml.svg b/tests/auto/qsvgplugin/invalid_xml.svg new file mode 100644 index 0000000..e0814ae --- /dev/null +++ b/tests/auto/qsvgplugin/invalid_xml.svg @@ -0,0 +1,2 @@ + + + + + + + + + + + + +