[vlc-commits] [Git][videolan/vlc][master] contrib: qtdeclarative: add patch to prevent null pointer dereference in QQuickPopup
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Sun Jan 5 10:46:18 UTC 2025
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
d1d0a507 by Fatih Uzunoglu at 2025-01-05T10:15:36+00:00
contrib: qtdeclarative: add patch to prevent null pointer dereference in QQuickPopup
- - - - -
2 changed files:
- + contrib/src/qtdeclarative/0001-Add-missing-null-pointer-check-in-QQuickPopup.patch
- contrib/src/qtdeclarative/rules.mak
Changes:
=====================================
contrib/src/qtdeclarative/0001-Add-missing-null-pointer-check-in-QQuickPopup.patch
=====================================
@@ -0,0 +1,33 @@
+From 4c1fb51e53f0df69684ea811080d7b9ab222cff1 Mon Sep 17 00:00:00 2001
+From: Fatih Uzunoglu <fuzun54 at outlook.com>
+Date: Wed, 1 Jan 2025 17:16:13 +0200
+Subject: [PATCH] Add missing null pointer check in QQuickPopup
+
+Otherwise in certain circumstances this causes
+null pointer dereference induced crash.
+
+This is only relevant when the new Qt 6.8 feature
+`popupType: Popup.Window` is used where it makes
+it possible for Quick Popups to have their own
+independent windows.
+---
+ src/quicktemplates/qquickpopup.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/quicktemplates/qquickpopup.cpp b/src/quicktemplates/qquickpopup.cpp
+index 85062f44fd..f85bcdd296 100644
+--- a/src/quicktemplates/qquickpopup.cpp
++++ b/src/quicktemplates/qquickpopup.cpp
+@@ -1104,7 +1104,8 @@ void QQuickPopupPrivate::adjustPopupItemParentAndWindow()
+ popupItem->setParentItem(popupWindow->contentItem());
+ popupItem->forceActiveFocus(Qt::PopupFocusReason);
+ }
+- popupWindow->setVisible(visible);
++ if (popupWindow)
++ popupWindow->setVisible(visible);
+ } else {
+ if (visible) {
+ popupItem->setParentItem(overlay);
+--
+2.47.1
+
=====================================
contrib/src/qtdeclarative/rules.mak
=====================================
@@ -35,6 +35,7 @@ $(TARBALLS)/qtdeclarative-everywhere-src-$(QTDECLARATIVE_VERSION).tar.xz:
qtdeclarative: qtdeclarative-everywhere-src-$(QTDECLARATIVE_VERSION).tar.xz .sum-qtdeclarative
$(UNPACK)
$(APPLY) $(SRC)/qtdeclarative/0001-Add-missing-disconnect-and-null-check-in-QQuickPopup.patch
+ $(APPLY) $(SRC)/qtdeclarative/0001-Add-missing-null-pointer-check-in-QQuickPopup.patch
# disable unused CLI tools: qml, qmleasing, qmldom, qmlformat, qmltc
sed -i.orig -e 's,add_subdirectory(qml),#add_subdirectory(qml),' $(UNPACK_DIR)/tools/CMakeLists.txt
sed -i.orig -e 's,add_subdirectory(qmleasing),#add_subdirectory(qmleasing),' $(UNPACK_DIR)/tools/CMakeLists.txt
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d1d0a507f4b396f1c84791bb617afdbb92eb90f7
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d1d0a507f4b396f1c84791bb617afdbb92eb90f7
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list