[Libreoffice-commits] core.git: sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 4 19:52:41 UTC 2021
sw/source/core/doc/docdesc.cxx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 61ff5e8126c64ff521a148c5003e15a86d50c4cc
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Mar 4 15:50:08 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Mar 4 20:51:58 2021 +0100
ofz#31672 Bad-cast
==3484068== Invalid read of size 8
==3484068== at 0x226E9EDC: SwClient::GetRegisteredIn() const (calbck.hxx:159)
==3484068== by 0x22A09E30: SwDoc::ChgPageDesc(unsigned long, SwPageDesc const&) (docdesc.cxx:465)
==3484068== by 0x238B1ECC: UpdatePageDescs(SwDoc&, unsigned long) (fltshell.cxx:1094)
==3484068== by 0x1CDD6E52: SwWW8ImplReader::CoreLoad(WW8Glossary const*) (ww8par.cxx:5482)
==3484068== by 0x1CDD90A1: SwWW8ImplReader::LoadThroughDecryption(WW8Glossary*) (ww8par.cxx:5939)
==3484068== by 0x1CDDAE71: SwWW8ImplReader::LoadDoc(WW8Glossary*) (ww8par.cxx:6243)
==3484068== Address 0x28c215c8 is 40 bytes inside a block of size 56 free'd
==3484068== at 0x483AEDD: operator delete(void*) (vg_replace_malloc.c:584)
==3484068== by 0x23009F47: SwFormatHeader::~SwFormatHeader() (atrfrm.cxx:503)
==3484068== by 0x9DDC3F3: SfxItemPool::Remove(SfxPoolItem const&) (itempool.cxx:741)
==3484068== by 0x9E17BD6: SfxItemSet::~SfxItemSet() (itemset.cxx:252)
==3484068== by 0x227FE847: SwAttrSet::~SwAttrSet() (swatrset.hxx:161)
==3484068== by 0x227FD139: SwFormat::SetFormatAttr(SfxPoolItem const&) (format.cxx:524)
==3484068== by 0x22A07AA6: SwDoc::CopyMasterHeader(SwPageDesc const&, SwFormatHeader const&, SwPageDesc&, bool, bool) (docdesc.cxx:248)
==3484068== by 0x22A09B4D: SwDoc::ChgPageDesc(unsigned long, SwPageDesc const&) (docdesc.cxx:457)
==3484068== by 0x238B1ECC: UpdatePageDescs(SwDoc&, unsigned long) (fltshell.cxx:1094)
==3484068== by 0x1CDD6E52: SwWW8ImplReader::CoreLoad(WW8Glossary const*) (ww8par.cxx:5482)
==3484068== by 0x1CDD90A1: SwWW8ImplReader::LoadThroughDecryption(WW8Glossary*) (ww8par.cxx:5939)
==3484068== by 0x1CDDAE71: SwWW8ImplReader::LoadDoc(WW8Glossary*) (ww8par.cxx:6243)
since...
commit f5dc6b11d2218d94c9effe7a1ab418d0133da5e3
Date: Tue Jan 26 13:11:42 2021 +0100
tdf#140117 sw UI: keep headers/footers when inactive
Change-Id: I14787d4203c457393e8b5d0222df67d394a4c9ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111970
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 87a99ff13f84..1c40970c4ecd 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -462,11 +462,11 @@ void SwDoc::ChgPageDesc( size_t i, const SwPageDesc &rChged )
const bool bStashLeftHead = !rDesc.IsHeaderShared() && rChged.IsHeaderShared();
const bool bStashFirstMasterHead = !rDesc.IsFirstShared() && rChged.IsFirstShared();
const bool bStashFirstLeftHead = (!rDesc.IsHeaderShared() && rChged.IsHeaderShared()) || (!rDesc.IsFirstShared() && rChged.IsFirstShared());
- if (rLeftHead.GetRegisteredIn() && bStashLeftHead)
+ if (bStashLeftHead && rLeftHead.GetRegisteredIn())
rDesc.StashFrameFormat(rChged.GetLeft(), true, true, false);
- if (rFirstMasterHead.GetRegisteredIn() && bStashFirstMasterHead)
+ if (bStashFirstMasterHead && rFirstMasterHead.GetRegisteredIn())
rDesc.StashFrameFormat(rChged.GetFirstMaster(), true, false, true);
- if (rFirstLeftHead.GetRegisteredIn() && bStashFirstLeftHead)
+ if (bStashFirstLeftHead && rFirstLeftHead.GetRegisteredIn())
rDesc.StashFrameFormat(rChged.GetFirstLeft(), true, true, true);
rDesc.ChgHeaderShare( rChged.IsHeaderShared() );
@@ -500,11 +500,11 @@ void SwDoc::ChgPageDesc( size_t i, const SwPageDesc &rChged )
const bool bStashLeftFoot = !rDesc.IsFooterShared() && rChged.IsFooterShared();
const bool bStashFirstMasterFoot = !rDesc.IsFirstShared() && rChged.IsFirstShared();
const bool bStashFirstLeftFoot = (!rDesc.IsFooterShared() && rChged.IsFooterShared()) || (!rDesc.IsFirstShared() && rChged.IsFirstShared());
- if (rLeftFoot.GetRegisteredIn() && bStashLeftFoot)
+ if (bStashLeftFoot && rLeftFoot.GetRegisteredIn())
rDesc.StashFrameFormat(rChged.GetLeft(), false, true, false);
- if (rFirstMasterFoot.GetRegisteredIn() && bStashFirstMasterFoot)
+ if (bStashFirstMasterFoot && rFirstMasterFoot.GetRegisteredIn())
rDesc.StashFrameFormat(rChged.GetFirstMaster(), false, false, true);
- if (rFirstLeftFoot.GetRegisteredIn() && bStashFirstLeftFoot)
+ if (bStashFirstLeftFoot && rFirstLeftFoot.GetRegisteredIn())
rDesc.StashFrameFormat(rChged.GetFirstLeft(), false, true, true);
rDesc.ChgFooterShare( rChged.IsFooterShared() );
More information about the Libreoffice-commits
mailing list