rhbz#1775544 crash in updating entries in writer navigator

This commit is contained in:
Caolán McNamara 2019-11-22 10:15:29 +00:00
parent 0d9c470bde
commit 40bd91ca38
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,37 @@
From 821ae197db7d28aee0d25a74acbacee0b1b09d7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 22 Nov 2019 10:10:27 +0000
Subject: [PATCH] Resolves: rhbz#1775544 crash in navigator
see demo reproducer in rhbz#1775544 nChildCount is a count of all
descendants not just direct children.
Just looping while FirstChild returns something is sufficient.
Change-Id: If7b16032731d694bfffaae22faad5fe194d1822f
---
sw/source/uibase/utlui/content.cxx | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 468ba6cbfa16..3353bc6350e7 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2272,12 +2272,8 @@ bool SwContentTree::HasContentChanged()
}
if(bRemoveChildren)
{
- for(size_t j = 0; j < nChildCount; ++j)
- {
- SvTreeListEntry *const pRemove = FirstChild(pEntry);
- assert(pRemove);
- GetModel()->Remove(pRemove);
- }
+ while (SvTreeListEntry *const pRemove = FirstChild(pEntry))
+ RemoveEntry(pRemove);
}
if(!nChildCount)
{
--
2.20.1

View File

@ -54,7 +54,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/
@ -245,6 +245,7 @@ Patch3: 0001-Resolves-rhbz-1766990-starmath-might-not-be-availabl.patch
Patch4: 0001-rhbz-1773525-reducing-the-amount-of-saved-search-rep.patch
Patch5: 0002-rhbz-1773525-wrong-elements-removed-from-saved-entri.patch
Patch6: 0001-tdf-128399-sw-btlr-fix-clicking-to-lower-rotated-cel.patch
Patch7: 0001-Resolves-rhbz-1775544-crash-in-navigator.patch
%if 0%{?rhel}
# not upstreamed
@ -2137,6 +2138,9 @@ done
%{_includedir}/LibreOfficeKit
%changelog
* Fri Nov 22 2019 Caolán McNamara <caolanm@redhat.com> - 1:6.3.3.2-5
- rhbz#1775544 crash in updating entries in writer navigator
* Thu Nov 21 2019 Caolán McNamara <caolanm@redhat.com> - 1:6.3.3.2-4
- rhbz#1774688 backport bltr cell clicking fix