[SCM] Qt 4 packaging branch, experimental, updated. debian/4.8.0-1-16-gb33fee0
Felix Geyer
debfx-guest at alioth.debian.org
Wed Apr 4 12:46:21 UTC 2012
Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qt4-x11.git;a=commitdiff;h=b33fee0
The following commit has been merged in the experimental branch:
commit b33fee08d2005f5917fa51a4fe607a1766d4d8e9
Author: Felix Geyer <debfx-pkg at fobos.de>
Date: Wed Apr 4 14:45:50 2012 +0200
Add QTBUG-24718_Fix_a_crash_in_cursorToX_when_new_block_is_added.patch, cherry-picked from upstream.
---
debian/changelog | 2 +
...rash_in_cursorToX_when_new_block_is_added.patch | 30 ++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 4626351..704713a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,8 @@ qt4-x11 (4:4.8.1-1) UNRELEASED; urgency=low
* Drop fix_ftbfs_format-security.patch, fixed upstream.
* Refresh patches for the new upstream version.
* Update symbol files.
+ * Add QTBUG-24718_Fix_a_crash_in_cursorToX_when_new_block_is_added.patch,
+ cherry-picked from upstream.
-- Fathi Boudra <fabo at debian.org> Wed, 04 Jan 2012 22:15:56 +0200
diff --git a/debian/patches/QTBUG-24718_Fix_a_crash_in_cursorToX_when_new_block_is_added.patch b/debian/patches/QTBUG-24718_Fix_a_crash_in_cursorToX_when_new_block_is_added.patch
new file mode 100644
index 0000000..2b27b14
--- /dev/null
+++ b/debian/patches/QTBUG-24718_Fix_a_crash_in_cursorToX_when_new_block_is_added.patch
@@ -0,0 +1,30 @@
+From ebfbabf1f3c2e65acecdb06de3b3a47a933e38f9 Mon Sep 17 00:00:00 2001
+From: Jiang Jiang <jiang.jiang at nokia.com>
+Date: Mon, 2 Apr 2012 12:32:05 +0200
+Subject: [PATCH] Fix a crash in cursorToX() when new block is added
+
+When an empty new block is being added, the layoutData->memory data
+will be 0, thus QTextEngine::attributes() will return 0. We should
+only access the attributes pointer when some text actually exist.
+
+Task-number: QTBUG-24718
+Change-Id: I9ce9f7b57bccf24099a02832ce30fb6cebfaad33
+Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt at nokia.com>
+Bug: https://bugreports.qt-project.org/browse/QTBUG-24718
+---
+ src/gui/text/qtextlayout.cpp | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+--- a/src/gui/text/qtextlayout.cpp
++++ b/src/gui/text/qtextlayout.cpp
+@@ -2508,6 +2508,10 @@ qreal QTextLine::cursorToX(int *cursorPos, Edge edge) const
+ int pos = *cursorPos;
+ int itm;
+ const HB_CharAttributes *attributes = eng->attributes();
++ if (!attributes) {
++ *cursorPos = 0;
++ return x.toReal();
++ }
+ while (pos < line.from + line.length && !attributes[pos].charStop)
+ pos++;
+ if (pos == line.from + (int)line.length) {
diff --git a/debian/patches/series b/debian/patches/series
index 1b8b79c..78f78e2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,6 +2,7 @@
Add_support_for_QT_USE_DRAG_DISTANCE_env_var.patch
QTBUG-14724_close_orphaned_file_descriptors_after_printing.patch
QTBUG-21900_Buttons_in_Qt_applications_not_clickable_when_run_under_gnome-shell.patch
+QTBUG-24718_Fix_a_crash_in_cursorToX_when_new_block_is_added.patch
# qt-copy patches
0195-compositing-properties.diff
--
Qt 4 packaging
More information about the pkg-kde-commits
mailing list