basic/source/sbx/sbxarray.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit b80fc56c89e805372d87373903a6c4da0c4466c8
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Mar 30 09:14:01 2021 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Mar 30 12:34:39 2021 +0200

    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 <caol...@redhat.com>

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 );
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to