summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-04-18 19:15:38 +0200
committerEike Rathke <erack@redhat.com>2016-04-18 22:05:56 +0200
commit332ffb5e84a114ac74d209da6eb1856fbba22b66 (patch)
tree2dbbac79dc905ad907d390fc0c858d3420060b85 /i18npool
parent0d9e0eb6173cb47d8e311384f5aa79a6d10bfac5 (diff)
check API call argument value
Change-Id: I5eb0fbd6a6671c2cded38800c3223bccf0f7ff60
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index d2b330e4f94b..dfec9cfe0deb 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -946,6 +946,9 @@ static const sal_Int32 nSupported_NumberingTypes = sizeof(aSupportedTypes) / siz
OUString DefaultNumberingProvider::makeNumberingIdentifier(sal_Int16 index)
throw(RuntimeException, std::exception)
{
+ if (index < 0 || index >= nSupported_NumberingTypes)
+ throw RuntimeException();
+
if (aSupportedTypes[index].cSymbol)
return OUString(aSupportedTypes[index].cSymbol, strlen(aSupportedTypes[index].cSymbol), RTL_TEXTENCODING_UTF8);
else {