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

emf: test for negative numbers

Change-Id: I9d9b6f3e9592ca7b85cee5422e43d4ca46b8bb36
üst 5a0017f8
...@@ -1441,7 +1441,7 @@ bool EnhWMFReader::ReadEnhWMF() ...@@ -1441,7 +1441,7 @@ bool EnhWMFReader::ReadEnhWMF()
DBG_ASSERT( ( nOptions & ( ETO_PDY | ETO_GLYPH_INDEX ) ) == 0, "SJ: ETO_PDY || ETO_GLYPH_INDEX in EMF" ); DBG_ASSERT( ( nOptions & ( ETO_PDY | ETO_GLYPH_INDEX ) ) == 0, "SJ: ETO_PDY || ETO_GLYPH_INDEX in EMF" );
Point aPos( ptlReferenceX, ptlReferenceY ); Point aPos( ptlReferenceX, ptlReferenceY );
if ( nLen && nLen < static_cast<sal_Int32>( SAL_MAX_UINT32 / sizeof(sal_Int32) ) ) if ( nLen > 0 && nLen < static_cast<sal_Int32>( SAL_MAX_UINT32 / sizeof(sal_Int32) ) )
{ {
if ( offDx && (( nCurPos + offDx + nLen * 4 ) <= nNextPos ) ) if ( offDx && (( nCurPos + offDx + nLen * 4 ) <= nNextPos ) )
{ {
......
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