diff options
author | Michael Palimaka <kensington@gentoo.org> | 2016-02-15 03:28:18 +1100 |
---|---|---|
committer | Michael Palimaka <kensington@gentoo.org> | 2016-02-15 03:29:15 +1100 |
commit | 293c6581f8173670b09ad92c903c4866565652a1 (patch) | |
tree | c6f2e4979361f8480db74a92c4eb8a3df9a90328 /dev-qt/qtgui/files | |
parent | net-nntp/nzbget: Remove double -- from init script (diff) | |
download | gentoo-293c6581f8173670b09ad92c903c4866565652a1.tar.gz gentoo-293c6581f8173670b09ad92c903c4866565652a1.tar.bz2 gentoo-293c6581f8173670b09ad92c903c4866565652a1.zip |
dev-qt/qtgui: backport patch from upstream resolving crash
Gentoo-bug: 574636
Package-Manager: portage-2.2.27
Diffstat (limited to 'dev-qt/qtgui/files')
-rw-r--r-- | dev-qt/qtgui/files/qtgui-5.5.1-crash.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/dev-qt/qtgui/files/qtgui-5.5.1-crash.patch b/dev-qt/qtgui/files/qtgui-5.5.1-crash.patch new file mode 100644 index 000000000000..a2b8e62ac15b --- /dev/null +++ b/dev-qt/qtgui/files/qtgui-5.5.1-crash.patch @@ -0,0 +1,34 @@ +From 79447068579ea93d616d840bb8cbbf8adb1ed6ec Mon Sep 17 00:00:00 2001 +From: Nicolas Capens <capn@google.com> +Date: Tue, 10 Nov 2015 00:03:34 -0500 +Subject: Fix potential division by zero. + +In a Chrome Remote Desktop session the htotal and/or vtotal timings +can be zero and lead to a SIGFPE exception. + +Task-number: QTBUG-49322 +Change-Id: Id530335cc760d1938ed888ad095427fcf32c651d +Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> +Reviewed-by: Nicolas Capens <nicolas.capens@gmail.com> +Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com> +--- + src/plugins/platforms/xcb/qxcbscreen.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp +index 2a53b18..0e99d58 100644 +--- a/src/plugins/platforms/xcb/qxcbscreen.cpp ++++ b/src/plugins/platforms/xcb/qxcbscreen.cpp +@@ -558,7 +558,8 @@ void QXcbScreen::updateRefreshRate(xcb_randr_mode_t mode) + for (; modesIter.rem; xcb_randr_mode_info_next(&modesIter)) { + xcb_randr_mode_info_t *modeInfo = modesIter.data; + if (modeInfo->id == mode) { +- m_refreshRate = modeInfo->dot_clock / (modeInfo->htotal * modeInfo->vtotal); ++ const uint32_t dotCount = modeInfo->htotal * modeInfo->vtotal; ++ m_refreshRate = (dotCount != 0) ? modeInfo->dot_clock / dotCount : 0; + m_mode = mode; + break; + } +-- +cgit v0.11.0 + |