From 1e4505175f32c73d858737def5377c99828cff01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 24 Apr 2018 13:23:57 +0100 Subject: [PATCH] Resolves: tdf#116951 rhbz#1569331 start is G_MAXINT --- ...16951-rhbz-1569331-start-is-G_MAXINT.patch | 37 +++++++++++++++++++ libreoffice.spec | 6 ++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0001-Resolves-tdf-116951-rhbz-1569331-start-is-G_MAXINT.patch diff --git a/0001-Resolves-tdf-116951-rhbz-1569331-start-is-G_MAXINT.patch b/0001-Resolves-tdf-116951-rhbz-1569331-start-is-G_MAXINT.patch new file mode 100644 index 0000000..dbdb845 --- /dev/null +++ b/0001-Resolves-tdf-116951-rhbz-1569331-start-is-G_MAXINT.patch @@ -0,0 +1,37 @@ +From a1e24ab0a98ea6155c581907aca42532311218df Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 24 Apr 2018 11:39:20 +0100 +Subject: [PATCH] Resolves: tdf#116951 rhbz#1569331 start is G_MAXINT + +and text is nullptr, seeing as an end G_MAXINT translates to str len, +assume the same for start + +Change-Id: I76b8bb0e66694129d36bbe08a6d55fc434f3434f +--- + vcl/unx/gtk3/gtk3gtkframe.cxx | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx +index 113fcb425963..8a18974d2635 100644 +--- a/vcl/unx/gtk3/gtk3gtkframe.cxx ++++ b/vcl/unx/gtk3/gtk3gtkframe.cxx +@@ -3977,8 +3977,14 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ + ExtTextInputAttr sal_attr = ExtTextInputAttr::NONE; + + pango_attr_iterator_range (iter, &start, &end); +- if (end == G_MAXINT) +- end = pText ? g_utf8_strlen(pText, -1) : 0; ++ if (start == G_MAXINT || end == G_MAXINT) ++ { ++ auto len = pText ? g_utf8_strlen(pText, -1) : 0; ++ if (end == G_MAXINT) ++ end = len; ++ if (start == G_MAXINT) ++ start = len; ++ } + if (end == start) + continue; + +-- +2.14.3 + diff --git a/libreoffice.spec b/libreoffice.spec index 3bdb0c1..aada346 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -62,7 +62,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.2 -Release: 4%{?libo_prerelease}%{?dist} +Release: 5%{?libo_prerelease}%{?dist} License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and MPLv2.0 and CC0 URL: http://www.libreoffice.org/ @@ -278,6 +278,7 @@ Patch6: 0001-rhbz-1392145-ensure-titlebar-close-button-matches-ou.patch Patch7: 0001-Related-rhbz-1396729-use-cairo_surface_create_simila.patch Patch8: 0001-tdf-95843-Wait-for-fire_glxtest_process-also-in-head.patch Patch9: 0001-Related-tdf-116951-rhbz-1569331-end-should-be-in-ter.patch +Patch10: 0001-Resolves-tdf-116951-rhbz-1569331-start-is-G_MAXINT.patch %if 0%{?rhel} # not upstreamed @@ -2327,6 +2328,9 @@ done %{_includedir}/LibreOfficeKit %changelog +* Tue Apr 24 2018 Caolán McNamara - 1:6.0.3.2-5 +- Resolves: tdf#116951 rhbz#1569331 start is G_MAXINT + * Thu Apr 19 2018 Stephan Bergmann - 1:6.0.3.2-4 - Resolves: rhbz#1568579 LibreOffice --headless zombie process - Related: rhbz#1569331 end should be in terms of unicode chars, not bytes