diff --git a/0001-tdf-128138-sw_redlinehide-fix-infinite-loop-in-FindA.patch b/0001-tdf-128138-sw_redlinehide-fix-infinite-loop-in-FindA.patch new file mode 100644 index 0000000..783dce6 --- /dev/null +++ b/0001-tdf-128138-sw_redlinehide-fix-infinite-loop-in-FindA.patch @@ -0,0 +1,44 @@ +From f51021a30d9126dcd3384c268517f74481d11c1e Mon Sep 17 00:00:00 2001 +From: Michael Stahl +Date: Mon, 14 Oct 2019 14:56:48 +0200 +Subject: [PATCH] tdf#128138 sw_redlinehide: fix infinite loop in + FindAttrsImpl() + +The code looked wrong previously, always assigning the end of the text +node regardless of direction, but it turns out the improvement caused an +infinite loop... let's just swap things after the loop, seems simpler +than adding another if at the assignments. + +(regression from 4caef398af256be5f0c2a159129b528ee3702e5c) + +Change-Id: I098f5265fa86d6a2511a80a02230899a7a303a88 +Reviewed-on: https://gerrit.libreoffice.org/80774 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +--- + sw/source/core/crsr/findattr.cxx | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx +index 9d5f2745afda..37be1ceec435 100644 +--- a/sw/source/core/crsr/findattr.cxx ++++ b/sw/source/core/crsr/findattr.cxx +@@ -1198,9 +1198,12 @@ static bool FindAttrsImpl(SwPaM & rSearchPam, + } + } + +- // if backward search, switch point and mark +- if( bFound && !bSrchForward ) +- rSearchPam.Exchange(); ++ // in search direction, mark precedes point, because the next iteration ++ // starts at point ++ if (bFound) ++ { ++ rSearchPam.Normalize(!bSrchForward); ++ } + + return bFound; + } +-- +2.21.0 + diff --git a/libreoffice.spec b/libreoffice.spec index ca4c1d8..895de74 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -54,7 +54,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.2 -Release: 1%{?libo_prerelease}%{?dist} +Release: 2%{?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/ @@ -243,6 +243,7 @@ Patch0: 0001-don-t-suppress-crashes.patch # not upstreamed Patch1: 0001-Resolves-rhbz-1432468-disable-opencl-by-default.patch Patch2: 0001-rhbz-1690732-basic-font-variation-support.patch +Patch3: 0001-tdf-128138-sw_redlinehide-fix-infinite-loop-in-FindA.patch %if 0%{?rhel} # not upstreamed @@ -2137,6 +2138,9 @@ done %{_includedir}/LibreOfficeKit %changelog +* Mon Oct 14 2019 Caolán McNamara - 1:6.2.8.2-2 +- rhbz#1761199 infinite loop in attributes search + * Thu Oct 10 2019 Caolán McNamara - 1:6.2.8.2-1 - latest stable release