diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-30 09:14:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-30 12:34:39 +0200 |
commit | b80fc56c89e805372d87373903a6c4da0c4466c8 (patch) | |
tree | 16de3808787be5fdea5830383f954cb7b5bb7e8a /basic | |
parent | f974664988d84a32196c152a3cf996e2b4909f70 (diff) |
cid#1474044 Untrusted loop bound
Change-Id: I9f060fe0b56905def7b81a9b7da0b504367eb36c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113337
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/sbx/sbxarray.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
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 ); } |