summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-12-05 21:45:48 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-12-06 05:32:37 +0000
commitb15eb164a8e44c02c196cef9f3de5e5478eb78de (patch)
tree549922673e2594c385ddaabe0fb379a8ff0e020c /toolkit
parentd3f9b3029a1b5f6b389978509fdf8de7e128a4b3 (diff)
tdf#152380: add checks for names and values sequences length equality
Change-Id: Ibeef551126874bcfffb4e7736588e2e1873f5768 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143681 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index c5e8165f60b8..983ea89459ee 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -1290,6 +1290,9 @@ void UnoControlModel::setPropertyValues( const css::uno::Sequence< OUString >& r
::osl::ClearableMutexGuard aGuard( GetMutex() );
sal_Int32 nProps = rPropertyNames.getLength();
+ if (nProps != Values.getLength())
+ throw css::lang::IllegalArgumentException("lengths do not match",
+ static_cast<cppu::OWeakObject*>(this), -1);
// sal_Int32* pHandles = new sal_Int32[nProps];
// don't do this - it leaks in case of an exception