From 332ffb5e84a114ac74d209da6eb1856fbba22b66 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Mon, 18 Apr 2016 19:15:38 +0200 Subject: [PATCH] check API call argument value Change-Id: I5eb0fbd6a6671c2cded38800c3223bccf0f7ff60 --- .../defaultnumberingprovider/defaultnumberingprovider.cxx | 3 +++ 1 file changed, 3 insertions(+) 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 {