diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2019-11-19 15:39:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-11-19 22:18:30 +0100 |
commit | bd2ada701aad2c4e85d03cd8db68eaeae081d91c (patch) | |
tree | 347606ce24326ce2f9bbae81a81588bbe92bd5df /sw/qa | |
parent | b0e7e494b6bc69d3833c0a6c256ff8106a4a24cb (diff) |
ofz#18554 sw: fix Null-dereference due to overlapping fieldmarks
The problem is that the WW8 import wants to set a fieldmark on a range
that contains only the CH_TXT_ATR_FIELDEND of another fieldmark:
(rr) p io_pDoc->GetNodes()[12]->m_Text.copy(33,10)
$30 = "\bÿÿÿ\001ÿÿÿ\001 "
MarkManager::makeMark() must check that a new fieldmark never overlaps
existing fieldmarks or meta-fields.
While at it, it looks like the test in
DocumentContentOperationsManager::DelFullPara() can't necessarily use
the passed rPam, because it obviously deletes entire nodes, but at
least SwRangeRedline::DelCopyOfSection() doesn't even set nContent
on rPam.
Also, the check in makeMark() triggers an assert in
CppunitTest_sw_uiwriter testTextFormFieldInsertion because
SwHistoryTextFieldmark::SetInDoc() was neglecting to subtract 1
from the end position for the CH_TXT_ATR_FIELDEND.
Change-Id: I46c1955dd8dd422a41dcbb9bc68dbe09075b4922
Reviewed-on: https://gerrit.libreoffice.org/83000
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/core/data/ww8/pass/ofz18554-1.doc | bin | 0 -> 23041 bytes |
1 files changed, 0 insertions, 0 deletions
diff --git a/sw/qa/core/data/ww8/pass/ofz18554-1.doc b/sw/qa/core/data/ww8/pass/ofz18554-1.doc Binary files differnew file mode 100644 index 000000000000..0a6b81d78b43 --- /dev/null +++ b/sw/qa/core/data/ww8/pass/ofz18554-1.doc |