Kaydet (Commit) f6706362 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1241372 Negative array index read

Change-Id: I73bae29c6cc737d341381c010face6b587b31598
üst faf99f6f
......@@ -611,9 +611,19 @@ sal_Unicode SAL_CALL NativeNumberSupplierService::getNativeNumberChar( const sal
return j;
return inChar;
}
else if (isNumber(inChar) && isValidNatNum(rLocale, nNativeNumberMode)) {
if (!isNumber(inChar))
return inChar;
if (!isValidNatNum(rLocale, nNativeNumberMode))
return inChar;
sal_Int16 langnum = getLanguageNumber(rLocale);
switch (nNativeNumberMode) {
if (langnum == -1)
return inChar;
switch (nNativeNumberMode)
{
case NativeNumberMode::NATNUM1: // Char, Lower
case NativeNumberMode::NATNUM4: // Text, Lower, Long
case NativeNumberMode::NATNUM7: // Text. Lower, Short
......@@ -632,7 +642,7 @@ sal_Unicode SAL_CALL NativeNumberSupplierService::getNativeNumberChar( const sal
default:
break;
}
}
return inChar;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment