[Libreoffice-commits] core.git: 2 commits - package/source vcl/source

Noel Grandin noel at peralex.com
Wed May 14 00:50:01 PDT 2014


 package/source/zipapi/ZipFile.cxx |    2 +-
 vcl/source/gdi/bitmap4.cxx        |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 8c004aa108f7b712b377469139baf9f0f53d0c93
Author: Noel Grandin <noel at peralex.com>
Date:   Wed May 14 09:45:34 2014 +0200

    cid#982783 Unintentional integer overflow
    
    Change-Id: Ida52d1fbe3d84c9c0070c91ae24cae58dc4aa13f

diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index 8444dce..2c8d7e8 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -1097,7 +1097,7 @@ void ZipFile::getSizeAndCRC( sal_Int64 nOffset, sal_Int64 nCompressedSize, sal_I
     sal_Int32 nBlockSize = static_cast< sal_Int32 > (::std::min( nCompressedSize, static_cast< sal_Int64 >( 32000 ) ) );
 
     aGrabber.seek( nOffset );
-    for ( int ind = 0;
+    for ( sal_Int64 ind = 0;
           !aInflaterLocal.finished() && aGrabber.readBytes( aBuffer, nBlockSize ) && ind * nBlockSize < nCompressedSize;
           ind++ )
     {
commit 3c42d5e41478cb5abd4f592633d6eb2f4145c6db
Author: Noel Grandin <noel at peralex.com>
Date:   Wed May 14 09:38:55 2014 +0200

    cid#705542 Unintentional integer overflow
    
    Change-Id: Ibd3ef676de7d99ebdd273ee85665ddf9ec0f9c10

diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index f8c987e..29d4e57 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -946,8 +946,8 @@ bool Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*p
         {
             const long      nWidth = pWriteAcc->Width();
             const long      nHeight = pWriteAcc->Height();
-            const sal_uLong     nEntryCount = 1 << pWriteAcc->GetBitCount();
-            sal_uLong           n;
+            const sal_uLong nEntryCount = 1L << pWriteAcc->GetBitCount();
+            sal_uLong       n;
             PopArtEntry*    pPopArtTable = new PopArtEntry[ nEntryCount ];
 
             for( n = 0; n < nEntryCount; n++ )


More information about the Libreoffice-commits mailing list