basic/source/runtime/methods1.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b710ba48503372ddaf10a17ce7f4f3340bc8adb8
Author:     Ahmed Khaled <gostahmedkha...@gmail.com>
AuthorDate: Tue Mar 18 03:48:00 2025 +0200
Commit:     Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
CommitDate: Wed May 7 07:41:52 2025 +0200

    tdf#154285 Check upper bound of arguments in SbRtl_FindObject &
    
    SbRtl_FindPropertyObject function
    
    Change-Id: I49b56f0231c5a19871a4a007a0bc21598920b72c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183052
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
    Tested-by: Jenkins

diff --git a/basic/source/runtime/methods1.cxx 
b/basic/source/runtime/methods1.cxx
index 92ce33d54b47..e1fd37e45018 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -755,7 +755,7 @@ void SbRtl_DimArray(StarBASIC *, SbxArray & rPar, bool)
 // 1st parameter = the object's name as string
 void SbRtl_FindObject(StarBASIC *, SbxArray & rPar, bool)
 {
-    if (rPar.Count() < 2)
+    if (rPar.Count() != 2)
         return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
 
 
@@ -776,7 +776,7 @@ void SbRtl_FindObject(StarBASIC *, SbxArray & rPar, bool)
 // 2nd parameter = the property's name as string
 void SbRtl_FindPropertyObject(StarBASIC *, SbxArray & rPar, bool)
 {
-    if (rPar.Count() < 3)
+    if (rPar.Count() != 3)
         return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
 
 

Reply via email to