From 10a7f48aa83aaf78ccd09d3cab1a961aa1e8219e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 13 Jan 2017 11:41:55 +0000 Subject: ofz: ensure all not explicitly set indexes are zero Change-Id: Idbe6ceeb61d3dfe26f281349181e7a60f7e59000 (cherry picked from commit 14d9b3519adac8543b52ddb84e49eecbdd1d9eb2) Reviewed-on: https://gerrit.libreoffice.org/33035 Tested-by: Jenkins Reviewed-by: Michael Stahl --- vcl/source/filter/ixpm/xpmread.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vcl/source') diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx index bdeacf940121..3d222584df96 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; -- cgit