sc/source/filter/excel/xistream.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 8c85782bbe46963e2be32c3cb406982f1790fc2f Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Nov 14 13:47:15 2019 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Nov 14 22:26:15 2019 +0100 coverity#1242892 Untrusted value as argument Change-Id: Ia4fd0a270d42fc2da233da18d4122f786c79dc3d Reviewed-on: https://gerrit.libreoffice.org/82697 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 f7427b9295ed..a0293e69dd6e 100644 --- a/sc/source/filter/excel/xistream.cxx +++ b/sc/source/filter/excel/xistream.cxx @@ -831,7 +831,7 @@ std::size_t XclImpStream::ReadUniStringExtHeader( bool& rb16Bit, sal_uInt8 nFlag OUString XclImpStream::ReadRawUniString( sal_uInt16 nChars, bool b16Bit ) { - OUStringBuffer aRet(nChars); + OUStringBuffer aRet(std::min<sal_uInt16>(nChars, mnRawRecLeft / (b16Bit ? 2 : 1))); sal_uInt16 nCharsLeft = nChars; sal_uInt16 nReadSize; @@ -839,7 +839,7 @@ OUString XclImpStream::ReadRawUniString( sal_uInt16 nChars, bool b16Bit ) { if( b16Bit ) { - nReadSize = ::std::min< sal_uInt16 >( nCharsLeft, mnRawRecLeft / 2 ); + nReadSize = std::min<sal_uInt16>(nCharsLeft, mnRawRecLeft / 2); OSL_ENSURE( (nReadSize <= nCharsLeft) || !(mnRawRecLeft & 0x1), "XclImpStream::ReadRawUniString - missing a byte" ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits