From 356e1beec294b7b2ad272db76ea4dbb9ae3edacb Mon Sep 17 00:00:00 2001 From: Simon Chenery Date: Mon, 9 Mar 2026 19:29:46 +0100 Subject: [PATCH] tdf#154285 Check too many arguments to BASIC FILELEN function Change-Id: I21704e84bed54ad4295d52d82eb4a92ff70a3abc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201298 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- basic/source/runtime/methods.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index aa608802edc3..d83b4bcee60b 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -708,7 +708,7 @@ void SbRtl_Exp(StarBASIC *, SbxArray & rPar, bool) void SbRtl_FileLen(StarBASIC *, SbxArray & rPar, bool) { - if (rPar.Count() < 2) + if (rPar.Count() != 2) { return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); }