diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-30 09:47:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-30 09:48:08 +0000 |
commit | 4d009bb402e465937dccd19351c96615beaab44b (patch) | |
tree | 994875b7fc072000ea7b962daf2a7190bcb2e247 /filter | |
parent | c7e1c9dc63a5986fc70fd86f36c8755b6c2a1f98 (diff) |
ofz: div by zero
Change-Id: Id5174bb9f0d89fc2286c130650ec27c9df13e123
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/ipict/ipict.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index b2d9c74a1574..58d8c794ecf9 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -843,7 +843,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo else if ( nPixelSize == 4 ) nSrcBPL = ( nWidth + 1 ) >> 1; else nSrcBPL = nWidth; nDestBPL = ( nSrcBPL + 3 ) & 0xfffc; - if ( nRowBytes < nSrcBPL || nRowBytes > nDestBPL ) + if (!nRowBytes || nRowBytes < nSrcBPL || nRowBytes > nDestBPL) return 0xffffffff; if (nRowBytes < 8 || nPackType == 1) |