sc/source/filter/excel/xistream.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 741c72e00ed3d647121ce385c0f9442ecebb6216 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Mar 30 10:37:50 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Mar 31 21:06:16 2021 +0200 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 <caol...@redhat.com> 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits