diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-12 21:07:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-07-12 21:24:44 +0100 |
commit | 4661b2dd34bd7c56b6d783d49f265e9ecde19caa (patch) | |
tree | 5d5081a52059c431f54d0d719d308506cf6e25c9 | |
parent | 5a0017f890b84fdc90db2bb95cb157fdf9eb9923 (diff) |
emf: test for negative numbers
Change-Id: I9d9b6f3e9592ca7b85cee5422e43d4ca46b8bb36
-rw-r--r-- | vcl/qa/cppunit/graphicfilter/data/emf/pass/crash-1.emf | bin | 0 -> 7068 bytes | |||
-rw-r--r-- | vcl/source/filter/wmf/enhwmf.cxx | 2 |
2 files changed, 1 insertions, 1 deletions
diff --git a/vcl/qa/cppunit/graphicfilter/data/emf/pass/crash-1.emf b/vcl/qa/cppunit/graphicfilter/data/emf/pass/crash-1.emf Binary files differnew file mode 100644 index 000000000000..bbc0285db6d2 --- /dev/null +++ b/vcl/qa/cppunit/graphicfilter/data/emf/pass/crash-1.emf diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index a44fac64ff72..e0eba9279b4b 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -1441,7 +1441,7 @@ bool EnhWMFReader::ReadEnhWMF() DBG_ASSERT( ( nOptions & ( ETO_PDY | ETO_GLYPH_INDEX ) ) == 0, "SJ: ETO_PDY || ETO_GLYPH_INDEX in EMF" ); 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 ) ) { |