[Libreoffice-commits] core.git: sc/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Mar 25 11:44:29 UTC 2019


 sc/source/filter/excel/xistream.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 756252ce13f541049af620983f6741223d44573b
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Mar 25 12:03:22 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Mar 25 12:44:05 2019 +0100

    tdf#124318 FILEOPEN: XLS Hyperlink URL incorrect
    
    regression from
        commit 52f69445c55c9af8ad97bee6da335b4592d56d4d
        Date:   Wed Aug 1 17:03:18 2018 +0200
        loplugin:stringloop in sc
    
    Change-Id: I7d481ea27866fc146c5de9d027aa7bb308f14e52
    Reviewed-on: https://gerrit.libreoffice.org/69652
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index 6decac3d88ce..d5f8c1e70f15 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -871,7 +871,9 @@ OUString XclImpStream::ReadRawUniString( sal_uInt16 nChars, bool b16Bit )
         }
 
         *pcEndChar = '\0';
-        aRet.append( pcBuffer.get(), pcUniChar - pcBuffer.get()  );
+        // this has the side-effect of only copying as far as the first null, which appears to be intentional. e.g.
+        // see tdf#124318
+        aRet.append( pcBuffer.get() );
 
         nCharsLeft = nCharsLeft - nReadSize;
         if( nCharsLeft > 0 )


More information about the Libreoffice-commits mailing list