coverity#1242892 Untrusted value as argument

Change-Id: Ia4fd0a270d42fc2da233da18d4122f786c79dc3d
Reviewed-on: https://gerrit.libreoffice.org/82697
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index f7427b9..a0293e6 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" );
        }