diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-12-05 20:05:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-12-10 20:38:19 +0100 |
commit | 8583ed7356036b0eef85e4fdb314568b0b2796a3 (patch) | |
tree | 3db4de01209340d0d6030d61cabfa6c68fc79a50 | |
parent | 5deb0ca100bf2bf962ea77c77b561186c3952b01 (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/+/177905
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 5e84620b1a5a60e14da0da942c87a86326ae6dae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177970
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-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 2ed6ce9fd383..7d0e6c4c0233 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) |