basic/source/runtime/methods.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0e6c78dcd63a799a2ca64b86bc5b5448395ac4b0
Author:     Vaibhav Singh <[email protected]>
AuthorDate: Tue Dec 16 21:03:31 2025 +0530
Commit:     Ilmari Lauhakangas <[email protected]>
CommitDate: Wed Dec 17 09:27:11 2025 +0100

    tdf#154285 Check upper bound of arguments in SbRtl_CreateObject
    
    function
    
    Change-Id: I64ada278c0ba8d178f62f28c4e4e9911ce3f5d1b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195732
    Reviewed-by: Ilmari Lauhakangas <[email protected]>
    Tested-by: Jenkins

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index bc4692a7a747..0c67e2bb74e8 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -186,7 +186,7 @@ static uno::Reference< ucb::XSimpleFileAccess3 > const & 
getFileAccess()
 
 void SbRtl_CreateObject(StarBASIC * pBasic, SbxArray & rPar, bool)
 {
-    if( rPar.Count() < 2 )
+    if( rPar.Count() != 2 )
         return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
 
     OUString aClass(rPar.Get(1)->GetOUString());

Reply via email to