diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-12-05 20:05:43 +0000 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2024-12-11 21:01:17 +0100 |
commit | 38cdc0405fdb8bd602b9c2121f280de9ea3cb71c (patch) | |
tree | 576420cca5e3a1832ed1c9a70fa59000ad2c0fe9 | |
parent | e9fed693f41514b1b84334f9db1c035bd286c097 (diff) |
crashtesting: HLINK_MARK embedded null import from forum-mso-en4-7137.doc
which causes problems on export to docx. Sanitize at the original
import.
Change-Id: I8b9fa86465c455fe872c41386889dc54e38eb9ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177904
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit f232952e727c50cc3a5927ff3b082f88e36c9bed)
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 5db85865ab81..c7854c7a1d96 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -347,6 +347,8 @@ void SwWW8ImplReader::ReadEmbeddedData(SvStream& rStrm, SwDocShell const * pDocS if( ::get_flag( nFlags, WW8_HLINK_MARK ) ) { xTextMark.reset(new OUString(read_uInt32_lenPrefixed_uInt16s_ToOUString(rStrm))); + if (clipToFirstNull(*xTextMark)) + SAL_WARN("sw.ww8", "HLINK_MARK with embedded null, truncating to: " << *xTextMark); } if (!xLongName && xShortName.get()) |