check API call argument value

Change-Id: I5eb0fbd6a6671c2cded38800c3223bccf0f7ff60
This commit is contained in:
Eike Rathke
2016-04-18 19:15:38 +02:00
parent 0d9e0eb617
commit 332ffb5e84

View File

@@ -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 {