[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 18 09:51:10 UTC 2021


 sw/source/core/txtnode/ndtxt.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 483ad8ac7e2374aa17dc83a4bf81fff1cbbcb98d
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Jul 11 21:32:33 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 18 11:50:33 2021 +0200

    ofz#35787 skip expensive ResetAttr if the document is in dtor
    
    lets try it initially just for fuzzing builds
    
    Change-Id: I4ae08348c53756a8f3693ba7cd5c6c3e255d91bd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118761
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 626b3b21bdd0..d76444d43011 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -255,7 +255,12 @@ SwTextNode::~SwTextNode()
     InitSwParaStatistics( false );
     DelFrames(nullptr); // must be called here while it's still a SwTextNode
     DelFrames_TextNodePart();
+#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
+    if (!GetDoc().IsInDtor())
+        ResetAttr(RES_PAGEDESC);
+#else
     ResetAttr(RES_PAGEDESC);
+#endif
     InvalidateInSwCache(RES_OBJECTDYING);
 }
 


More information about the Libreoffice-commits mailing list