diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-11-15 12:14:09 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-11-15 16:39:48 +0100 |
commit | 0e0bad1a6a3affa2b3fd82cc3834ae03ea7bc1d5 (patch) | |
tree | 5056894363313f0906fd1bd0d3ffd52ec5fab8c4 /sw/Module_sw.mk | |
parent | a9cc0100645deea53f27e35c7e754c9f062680d8 (diff) |
tdf#128736 sw ContinuousEndnotes: fix use-after-free on text frame join
Regression from commit 61cf196631a2a846e0d3b8b83c0805cf4d1d14b2 (sw
ContinuousEndnotes: fix moving them to the previous page, 2019-10-25),
the problem was that the SwFootnoteFrame::mpReference was not updated on
frame split. This meant that by the time the frame was joined,
SwTextFrame::JoinFrame() thought that the follow has no footnotes, so
the footnote reference was not updated, resulting in a dangling pointer.
Fix the problem by going back to using bEnd for endnotes (both the Word
compat and the normal case), this means that
SwTextFrame::ConnectFootnote() will invoke
SwFootnoteBossFrame::ChangeFootnoteRef(), fixing the dangling pointer.
Then fix the original problem differently: similar to the in-section
endnotes, just remove + append them, this makes sure that the endnotes
(in the Word compat case) move to a previous page on page delete.
Change-Id: Ia1b8e54b4a0b0f385c703f8e7016011c3ac57a03
Reviewed-on: https://gerrit.libreoffice.org/82778
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/Module_sw.mk')
-rw-r--r-- | sw/Module_sw.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index b16a4aea6e16..2dbd5f161f22 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -104,6 +104,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\ CppunitTest_sw_accessible_relation_set \ CppunitTest_sw_apitests \ CppunitTest_sw_unowriter \ + CppunitTest_sw_core_text \ )) ifneq ($(DISABLE_GUI),TRUE) |