summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog3
-rw-r--r--debian/patches/fix_selectedHtml_segfault.diff18
-rw-r--r--debian/patches/series1
3 files changed, 22 insertions, 0 deletions
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 <debian-qt-kde@lists.debian.org> 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> 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