summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-13 11:41:55 +0000
committerMichael Stahl <mstahl@redhat.com>2017-01-13 20:26:24 +0000
commit10a7f48aa83aaf78ccd09d3cab1a961aa1e8219e (patch)
treef6145cb9de6bc14adb4e5468e6a4a6f3c32d3b94 /vcl
parent1ce26b9f3503c3197a98383747213b679b7bbfc3 (diff)
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 <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/ixpm/xpmread.cxx4
1 files changed, 3 insertions, 1 deletions
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;