[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - vcl/source

Caolán McNamara caolanm at redhat.com
Fri Jan 13 20:26:44 UTC 2017


 vcl/source/filter/ixpm/xpmread.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit fc342c44c46287bbeb8bfb76d93fe601c87b8c5f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 13 11:41:55 2017 +0000

    ofz: ensure all not explicitly set indexes are zero
    
    Change-Id: Idbe6ceeb61d3dfe26f281349181e7a60f7e59000
    (cherry picked from commit 14d9b3519adac8543b52ddb84e49eecbdd1d9eb2)
    Reviewed-on: https://gerrit.libreoffice.org/33036
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx
index b757709..bca7f11e0 100644
--- a/vcl/source/filter/ixpm/xpmread.cxx
+++ b/vcl/source/filter/ixpm/xpmread.cxx
@@ -223,7 +223,9 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
                             // using 2 charakters per pixel and less than 257 Colors we speed up
                             if ( mnCpp == 2 )   // by using a 64kb indexing table
                             {
-                                mpFastColorTable = new sal_uInt8[ 256 * 256 ];
+                                const size_t nSize = 256 * 256;
+                                mpFastColorTable = new sal_uInt8[nSize];
+                                memset(mpFastColorTable, 0, nSize);
                                 for ( pPtr = mpColMap, i = 0; i < mnColors; i++, pPtr += mnCpp + 4 )
                                 {
                                     sal_uLong   j =  pPtr[ 0 ] << 8;


More information about the Libreoffice-commits mailing list