sw/source/filter/ww8/ww8par.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 0abbbae2fe6ee5c1c7fbf9d8bd92659e54842163
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Dec 5 20:05:43 2024 +0000
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Dec 6 14:04:04 2024 +0100

    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/+/177906
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Tested-by: Jenkins

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index d3118ce913c7..d2f67900b412 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -348,6 +348,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)

Reply via email to