[libreoffice/f16] Related: rhbz#743750 addXineramaScreenUnique issue

Caolan McNamara caolanm at fedoraproject.org
Wed Oct 19 09:12:38 UTC 2011


commit 9d9c158d301dc860666869e12b3e25fbf424dea2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 19 10:12:35 2011 +0100

    Related: rhbz#743750 addXineramaScreenUnique issue

 0001-make-sure-we-stay-in-array-bounds.patch |   29 ++++++++++++++++++++++++++
 libreoffice.spec                             |    7 +++++-
 2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/0001-make-sure-we-stay-in-array-bounds.patch b/0001-make-sure-we-stay-in-array-bounds.patch
new file mode 100644
index 0000000..81d262c
--- /dev/null
+++ b/0001-make-sure-we-stay-in-array-bounds.patch
@@ -0,0 +1,29 @@
+From dcb9d674c898d33f1895871c38ec308a460e9400 Mon Sep 17 00:00:00 2001
+From: Radek Doulik <rodo at novell.com>
+Date: Thu, 1 Sep 2011 11:14:21 +0200
+Subject: [PATCH] make sure we stay in array bounds
+
+---
+ vcl/unx/gtk/app/gtkdata.cxx |    6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
+index b68d023..c5d12c8 100644
+--- a/vcl/unx/gtk/app/gtkdata.cxx
++++ b/vcl/unx/gtk/app/gtkdata.cxx
+@@ -265,8 +265,10 @@ int GtkSalDisplay::GetDefaultMonitorNumber() const
+     gint nMonitors = gdk_screen_get_n_monitors(pScreen);
+     for (gint i = 0; i < nMonitors; ++i)
+     {
+-        if (g_ascii_strncasecmp (gdk_screen_get_monitor_plug_name(pScreen, i), "LVDS", 4) == 0)
+-            return m_aXineramaScreenIndexMap[i];
++        if (g_ascii_strncasecmp (gdk_screen_get_monitor_plug_name(pScreen, i), "LVDS", 4) == 0) {
++            OSL_ASSERT( size_t(i) < m_aXineramaScreenIndexMap.size() );
++            return (size_t(i) < m_aXineramaScreenIndexMap.size()) ? m_aXineramaScreenIndexMap[i] : 0;
++        }
+     }
+ #endif
+     return 0;
+-- 
+1.7.6.4
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 9d4aeb6..d91bb36 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -27,7 +27,7 @@ Summary:        Free Software Productivity Suite
 Name:           libreoffice
 Epoch:          1
 Version:        3.4.3.2
-Release:        11%{?dist}
+Release:        12%{?dist}
 License:        LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and (CDDL or GPLv2) and Public Domain
 Group:          Applications/Productivity
 URL:            http://www.documentfoundation.org/develop
@@ -126,6 +126,7 @@ Patch31: 0001-Resolves-rhbz-738255-avoid-crash-on-NULL-pointer.patch
 Patch32: fdo40856.bn.discard.patch
 Patch33: 0001-Fix-for-fdo-35513-avoid-crash-while-processing-incor.patch
 Patch34: 0001-fedora-gcc-4.6.1.patch
+Patch35: 0001-make-sure-we-stay-in-array-bounds.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -802,6 +803,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
 %patch32 -p1 -b .fdo40856.bn.discard.patch
 %patch33 -p1 -b .fdo35513-avoid-crash-while-processing-incor.patch
 %patch34 -p1 -b .fedora-gcc-4.6.1.patch
+%patch35 -p1 -b .make-sure-we-stay-in-array-bounds.patch
 
 # these are horribly incomplete--empty translations and copied english
 # strings with spattering of translated strings
@@ -2104,6 +2106,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %{basisinstdir}/program/kde-open-url
 
 %changelog
+* Wed Oct 19 2011 Caolán McNamara <caolanm at redhat.com> - 3.4.3.2-12
+- Related: rhbz#743750 addXineramaScreenUnique issue
+
 * Mon Oct  3 2011 Marek Kasik <mkasik at redhat.com> - 3.4.3.2-11
 - Rebuild (poppler-0.18.0 stable)
 - Enable pagein (by Caolán McNamara)


More information about the scm-commits mailing list