Kaydet (Commit) 6bf21323 authored tarafından Andre Fischer's avatar Andre Fischer Kaydeden (comit) Michael Meeks

#i119502# Guard array access against invalid indices.

Patch by: SunYing
Review by: Andre
üst efb912f8
...@@ -1962,8 +1962,12 @@ sal_Int32 GetValueForEnhancedCustomShapeParameter( const com::sun::star::drawing ...@@ -1962,8 +1962,12 @@ sal_Int32 GetValueForEnhancedCustomShapeParameter( const com::sun::star::drawing
{ {
case com::sun::star::drawing::EnhancedCustomShapeParameterType::EQUATION : case com::sun::star::drawing::EnhancedCustomShapeParameterType::EQUATION :
{ {
nValue = (sal_uInt16)rEquationOrder[ nValue ]; OSL_ASSERT(nValue < rEquationOrder.size());
nValue |= (sal_uInt32)0x80000000; if ( nValue < rEquationOrder.size() )
{
nValue = (sal_uInt16)rEquationOrder[ nValue ];
nValue |= (sal_uInt32)0x80000000;
}
} }
break; break;
case com::sun::star::drawing::EnhancedCustomShapeParameterType::NORMAL : case com::sun::star::drawing::EnhancedCustomShapeParameterType::NORMAL :
......
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