sc/source/ui/vba/vbafiledialogitems.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit bf4b2e9f1ef51731299714119361f6e5f73d9072 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Jul 5 15:53:55 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Jul 5 21:58:08 2019 +0200 cid#1448260 Argument cannot be negative Change-Id: I147f68c04c8905aac9e790766c260a30cc061d92 Reviewed-on: https://gerrit.libreoffice.org/75141 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/source/ui/vba/vbafiledialogitems.cxx b/sc/source/ui/vba/vbafiledialogitems.cxx index 8c0210c70fdc..551da71fda3e 100644 --- a/sc/source/ui/vba/vbafiledialogitems.cxx +++ b/sc/source/ui/vba/vbafiledialogitems.cxx @@ -67,7 +67,10 @@ uno::Any ScVbaFileDialogSelectedItems::createCollectionObject( const uno::Any& aSource ) { sal_Int32 nPosition = -1; - aSource >>= nPosition; + if (!(aSource >>= nPosition)) + throw uno::RuntimeException("not an sal_Int32"); + if (nPosition < 0 || nPosition >= static_cast<sal_Int32>(m_sItems.size())) + throw uno::RuntimeException("out of range"); OUString sPath = m_sItems[nPosition]; return uno::makeAny( sPath ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits