vcl/source/gdi/dibtools.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8e8724befa7c77ed2cab90a5a473c3fbde5f04ad
Author: David Tardon <[email protected]>
Date:   Mon Jan 25 14:06:39 2016 +0100

    return directly
    
    Change-Id: I606ef8281774bba13e28c3ee9fe1f99594152f4a

diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index f9258ce..e9c11ce 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -844,8 +844,9 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, 
Bitmap* pBmpAlpha, sal_uLon
         }
 
         const sal_Int64 nBitsPerLine (static_cast<sal_Int64>(aHeader.nWidth) * 
static_cast<sal_Int64>(aHeader.nBitCount));
+        if (nBitsPerLine > SAL_MAX_UINT32)
+            return false;
         const sal_uInt64 
nAlignedWidth(AlignedWidth4Bytes(static_cast<sal_uLong>(nBitsPerLine)));
-        bRet = nBitsPerLine <= SAL_MAX_UINT32;
 
         // (partially) check the image dimensions to avoid potential large 
bitmap allocation if the input is damaged
         if (aHeader.nCompression == ZCOMPRESS || aHeader.nCompression == 
COMPRESS_NONE)
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to