summarylogtreecommitdiffstats
path: root/0001-Fix-nullptr-dereference-with-invalid-SVG.patch
diff options
context:
space:
mode:
authorMartchus2023-10-16 23:54:03 +0200
committerMartchus2023-10-16 23:54:03 +0200
commit3b6288e0bed3cb5876bb5bc5dca0ec5c87269c67 (patch)
treee55c14ff5cea534aacc3fc83752951f1b18ccf49 /0001-Fix-nullptr-dereference-with-invalid-SVG.patch
parentda7e4b2d12102863655790646108852e3ec4c851 (diff)
downloadaur-3b6288e0bed3cb5876bb5bc5dca0ec5c87269c67.tar.gz
Fix crashes with malformed SVGs
Diffstat (limited to '0001-Fix-nullptr-dereference-with-invalid-SVG.patch')
-rw-r--r--0001-Fix-nullptr-dereference-with-invalid-SVG.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/0001-Fix-nullptr-dereference-with-invalid-SVG.patch b/0001-Fix-nullptr-dereference-with-invalid-SVG.patch
new file mode 100644
index 000000000000..3b84eb4bf691
--- /dev/null
+++ b/0001-Fix-nullptr-dereference-with-invalid-SVG.patch
@@ -0,0 +1,29 @@
+From 50aaab95b65433a6a8ed616c6f473ca12389e3f0 Mon Sep 17 00:00:00 2001
+From: Paul Olav Tvete <paul.tvete@qt.io>
+Date: Tue, 10 Oct 2023 10:14:22 +0200
+Subject: [PATCH] Fix nullptr dereference with invalid SVG
+
+Fixes: QTBUG-117944
+Pick-to: 6.6 6.5 6.2
+Change-Id: I9059dc28c750fc0585f1fb982152b211c323c6cd
+Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
+---
+ src/svg/qsvghandler.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
+index 2649422..335500a 100644
+--- a/src/svg/qsvghandler.cpp
++++ b/src/svg/qsvghandler.cpp
+@@ -3606,6 +3606,8 @@ void QSvgHandler::init()
+
+ static bool detectCycles(const QSvgNode *node, QList<const QSvgUse *> active = {})
+ {
++ if (Q_UNLIKELY(!node))
++ return false;
+ switch (node->type()) {
+ case QSvgNode::DOC:
+ case QSvgNode::G:
+--
+2.42.0
+