Skip to content

Commit

Permalink
Fix nullptr dereference with invalid SVG
Browse files Browse the repository at this point in the history
Fixes: QTBUG-117944
Pick-to: 6.5 6.2
Change-Id: I9059dc28c750fc0585f1fb982152b211c323c6cd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit edc8ca7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
  • Loading branch information
paulolav authored and Qt Cherry-pick Bot committed Oct 10, 2023
1 parent 56b35f9 commit effc444
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/svg/qsvghandler.cpp
Expand Up @@ -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:
Expand Down

0 comments on commit effc444

Please sign in to comment.