summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-04-23 20:35:40 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-04-23 20:40:51 +0100
commit7f5be85719985ce54ff65b88aaa420ed5b2e7a9b (patch)
tree7e5bc77950a13ab9daeb763dd0c29806b977cf80 /vcl/source
parentcf9c715aee2f97a1a6f611fe46a47e238cb03658 (diff)
cut out negative widths/heights early
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/gdi/pngread.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index 81b9280dbbdc..a7cf7eceb9c8 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -472,7 +472,7 @@ sal_Bool PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
maOrigSize.Width() = ImplReadsal_uInt32();
maOrigSize.Height() = ImplReadsal_uInt32();
- if ( !maOrigSize.Width() || !maOrigSize.Height() )
+ if (maOrigSize.Width() <= 0 || maOrigSize.Height() <= 0)
return sal_False;
mnPngDepth = *(maDataIter++);