diff options
author | Arnaud VERSINI <arnaud.versini@libreoffice.org> | 2022-07-24 20:07:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-05 15:59:06 +0200 |
commit | f2a98e85948451a9540831e0090422f08b945560 (patch) | |
tree | b750a5543a12a3963b9649b3513b845270c06560 /basic | |
parent | 26e33cb1fc7024d04b68569f904ffd8583aef1fb (diff) |
BASIC : missing parameter check in SbRtl_CreateObject
Change-Id: I44e8c17274e20eb080494b2eaf25f74d33a35b36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137394
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/methods.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index c2f979f2cb8f..3b718d78a9af 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -182,6 +182,9 @@ static uno::Reference< ucb::XSimpleFileAccess3 > const & getFileAccess() void SbRtl_CreateObject(StarBASIC * pBasic, SbxArray & rPar, bool) { + if( rPar.Count() < 2 ) + return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); + OUString aClass(rPar.Get(1)->GetOUString()); SbxObjectRef p = SbxBase::CreateObject( aClass ); if( !p.is() ) |