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
...@@ -1961,10 +1961,14 @@ sal_Int32 GetValueForEnhancedCustomShapeParameter( const com::sun::star::drawing ...@@ -1961,10 +1961,14 @@ sal_Int32 GetValueForEnhancedCustomShapeParameter( const com::sun::star::drawing
switch( rParameter.Type ) switch( rParameter.Type )
{ {
case com::sun::star::drawing::EnhancedCustomShapeParameterType::EQUATION : case com::sun::star::drawing::EnhancedCustomShapeParameterType::EQUATION :
{
OSL_ASSERT(nValue < rEquationOrder.size());
if ( nValue < rEquationOrder.size() )
{ {
nValue = (sal_uInt16)rEquationOrder[ nValue ]; nValue = (sal_uInt16)rEquationOrder[ nValue ];
nValue |= (sal_uInt32)0x80000000; 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