30 lines
874 B
Diff
30 lines
874 B
Diff
From edc8ca7f1e45302223b4b7962a57a30918f84c8d 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: 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 e6877ac..1cffbc3 100644
|
|
--- a/src/svg/qsvghandler.cpp
|
|
+++ b/src/svg/qsvghandler.cpp
|
|
@@ -3620,6 +3620,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:
|
|
--
|
|
cgit v1.2.3
|
|
|