diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-30 10:37:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-31 21:06:16 +0200 |
commit | 741c72e00ed3d647121ce385c0f9442ecebb6216 (patch) | |
tree | 3858889e3160c17b1956e1fa580b8638cb2ac0fc /sc/source/filter | |
parent | 441342654e5b4c61317b9a596396a1d817dd8547 (diff) |
cid#1242892 silence Untrusted loop bound
Change-Id: If7d1106e8cc5a5f5767df8ae6bfb6b1bfdb28f82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113401
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/filter')
-rw-r--r-- | sc/source/filter/excel/xistream.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx index f5f82e5176ff..e1126aaf2950 100644 --- a/sc/source/filter/excel/xistream.cxx +++ b/sc/source/filter/excel/xistream.cxx @@ -797,8 +797,10 @@ void XclImpStream::Ignore( std::size_t nBytes ) { // implementation similar to Read(), but without really reading anything std::size_t nBytesLeft = nBytes; - while( mbValid && (nBytesLeft > 0) ) + while (mbValid) { + if (!nBytesLeft) + break; sal_uInt16 nReadSize = GetMaxRawReadSize( nBytesLeft ); mbValid = checkSeek(mrStrm, mrStrm.Tell() + nReadSize); mnRawRecLeft = mnRawRecLeft - nReadSize; |