From b80fc56c89e805372d87373903a6c4da0c4466c8 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 30 Mar 2021 09:14:01 +0100 Subject: cid#1474044 Untrusted loop bound MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9f060fe0b56905def7b81a9b7da0b504367eb36c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113337 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- basic/source/sbx/sbxarray.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'basic') diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index fa2a2aa69f9a..4f5a9fd3cfb0 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -543,13 +543,13 @@ bool SbxDimArray::LoadData( SvStream& rStrm, sal_uInt16 nVer ) SAL_WARN("basic", "SbxDimArray::LoadData more entries claimed than stream could contain"); return false; } - } - for( short i = 0; i < nDimension && rStrm.GetError() == ERRCODE_NONE; i++ ) - { - sal_Int16 lb(0), ub(0); - rStrm.ReadInt16( lb ).ReadInt16( ub ); - AddDim( lb, ub ); + for (short i = 0; i < nDimension && rStrm.GetError() == ERRCODE_NONE; ++i) + { + sal_Int16 lb(0), ub(0); + rStrm.ReadInt16( lb ).ReadInt16( ub ); + AddDim( lb, ub ); + } } return SbxArray::LoadData( rStrm, nVer ); } -- cgit