basic/source/runtime/methods.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit a47949fececd584e7846dd119f323ea2dad0fd73 Author: Vaibhav Singh <[email protected]> AuthorDate: Tue Dec 16 20:57:50 2025 +0530 Commit: Ilmari Lauhakangas <[email protected]> CommitDate: Wed Dec 17 11:50:04 2025 +0100 tdf#154285 Check upper bound of arguments in implChr function Change-Id: I081ff9874b4fc00ff791cb5ae9ce5a27a6d6778c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195731 Reviewed-by: Ilmari Lauhakangas <[email protected]> Tested-by: Jenkins diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 0c67e2bb74e8..9df18d076023 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -312,7 +312,7 @@ void SbRtl_Asc(StarBASIC *, SbxArray & rPar, bool) static void implChr( SbxArray& rPar, bool bChrW ) { - if (rPar.Count() < 2) + if (rPar.Count() != 2) return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); SbxVariableRef pArg = rPar.Get(1);
