[Libreoffice-commits] core.git: sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jul 22 14:27:05 UTC 2019
sc/source/filter/excel/xistream.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 7c6d6e30c09756c6daf9961995356b5e0805b107
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jul 22 09:34:03 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jul 22 16:26:18 2019 +0200
cid#1242892 Untrusted value as argument
Change-Id: Ie08f75468fc7acbdf8b89496c750e5fec6d19f0d
Reviewed-on: https://gerrit.libreoffice.org/76103
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index a17170fdff26..8e48027cdf1b 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -835,8 +835,6 @@ OUString XclImpStream::ReadRawUniString( sal_uInt16 nChars, bool b16Bit )
sal_uInt16 nCharsLeft = nChars;
sal_uInt16 nReadSize;
- std::unique_ptr<sal_Unicode[]> pcBuffer(new sal_Unicode[ nCharsLeft + 1 ]);
-
while( IsValid() && (nCharsLeft > 0) )
{
if( b16Bit )
@@ -848,6 +846,8 @@ OUString XclImpStream::ReadRawUniString( sal_uInt16 nChars, bool b16Bit )
else
nReadSize = GetMaxRawReadSize( nCharsLeft );
+ std::unique_ptr<sal_Unicode[]> pcBuffer(new sal_Unicode[nReadSize + 1]);
+
sal_Unicode* pcUniChar = pcBuffer.get();
sal_Unicode* pcEndChar = pcBuffer.get() + nReadSize;
More information about the Libreoffice-commits
mailing list