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

New commits:
commit 45ff93aea24222a02c292c0ac443993f030dbb4d
Author:     Simon Chenery <simon_chen...@yahoo.com>
AuthorDate: Sat Mar 29 20:43:12 2025 +0100
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Mar 31 06:48:33 2025 +0200

    tdf#154285 Check too many arguments to BASIC WEEKDAY function
    
    Change-Id: I8f3044f1c8ebf12d4654b5ad173563e09897ccc6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183494
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/basic/source/runtime/methods1.cxx 
b/basic/source/runtime/methods1.cxx
index ff5f335797e1..92ce33d54b47 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -1639,7 +1639,7 @@ void SbRtl_WeekdayName(StarBASIC *, SbxArray & rPar, bool)
 void SbRtl_Weekday(StarBASIC *, SbxArray & rPar, bool)
 {
     sal_uInt32 nParCount = rPar.Count();
-    if ( nParCount < 2 )
+    if ( nParCount < 2 || nParCount > 3 )
     {
         StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
     }

Reply via email to