summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/excel/xistream.cxx4
1 files changed, 3 insertions, 1 deletions
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 )