[Libreoffice-commits] core.git: filter/source

Caolán McNamara caolanm at redhat.com
Mon Jan 30 09:48:46 UTC 2017


 filter/source/graphicfilter/ipict/ipict.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4d009bb402e465937dccd19351c96615beaab44b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 30 09:47:24 2017 +0000

    ofz: div by zero
    
    Change-Id: Id5174bb9f0d89fc2286c130650ec27c9df13e123

diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index b2d9c74..58d8c79 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)


More information about the Libreoffice-commits mailing list