From 889200701f9c1086947023cb341918755d9c4a1d Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Mon, 30 Oct 2017 20:04:04 +0300 Subject: Add a patch from Fedora to fix nullptr dereference in selectedHtml(). Closes: #880064. --- debian/changelog | 3 +++ debian/patches/fix_selectedHtml_segfault.diff | 18 ++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 22 insertions(+) create mode 100644 debian/patches/fix_selectedHtml_segfault.diff (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 35eb500..181cb55 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,8 @@ qtwebkit-opensource-src (5.212.0~alpha2-5) UNRELEASED; urgency=medium + [ Dmitry Shachnev ] + * Add a patch from Fedora to fix nullptr dereference in selectedHtml() + (fix_selectedHtml_segfault.diff, closes: #880064). -- Debian Qt/KDE Maintainers Mon, 30 Oct 2017 19:50:02 +0300 diff --git a/debian/patches/fix_selectedHtml_segfault.diff b/debian/patches/fix_selectedHtml_segfault.diff new file mode 100644 index 0000000..826bf5a --- /dev/null +++ b/debian/patches/fix_selectedHtml_segfault.diff @@ -0,0 +1,18 @@ +Description: fix nullptr dereference in QWebPageAdapter::selectedHtml() +Origin: Fedora, https://src.fedoraproject.org/cgit/rpms/qt5-qtwebkit.git/tree/qtwebkit-5.212.0-alpha2-fix-null-pointer-dereference.patch +Last-Update: 2017-10-30 + +--- a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp ++++ b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp +@@ -390,7 +390,10 @@ + + QString QWebPageAdapter::selectedHtml() const + { +- return page->focusController().focusedOrMainFrame().editor().selectedRange()->toHTML(); ++ RefPtr range = page->focusController().focusedOrMainFrame().editor().selectedRange(); ++ if (!range) ++ return QString(); ++ return range->toHTML(); + } + + bool QWebPageAdapter::isContentEditable() const diff --git a/debian/patches/series b/debian/patches/series index 2f9beef..d8c8b3b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ reduce_exports.diff detect_opengl_es2.diff atomic_config_test.diff fix_copyChars_segfault.diff +fix_selectedHtml_segfault.diff -- cgit v1.2.3