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

New commits:
commit 7c6d6e30c09756c6daf9961995356b5e0805b107
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Jul 22 09:34:03 2019 +0100
Commit:     Caolán McNamara <caol...@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 <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@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;
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to