mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
dev-qt/qtsvg: backport qt6.6 fix for crash with invalid SVGs
Bug: https://bugs.gentoo.org/915582 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
18
dev-qt/qtsvg/files/qtsvg-6.6.0-invalid-svg-crash.patch
Normal file
18
dev-qt/qtsvg/files/qtsvg-6.6.0-invalid-svg-crash.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
https://bugs.gentoo.org/915582
|
||||
https://bugreports.qt.io/browse/QTBUG-117944
|
||||
https://codereview.qt-project.org/c/qt/qtsvg/+/510692
|
||||
https://github.com/qt/qtsvg/commit/effc44495a33babd4cf7a2044123f420e6b3da1c
|
||||
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
|
||||
--- 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:
|
||||
@@ -16,3 +16,7 @@ RDEPEND="
|
||||
sys-libs/zlib:=
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-invalid-svg-crash.patch
|
||||
)
|
||||
Reference in New Issue
Block a user