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:30 +0000
commitfc342c44c46287bbeb8bfb76d93fe601c87b8c5f (patch)
treea68bea20a59d34285b6f7869a78d79c989a8946b /vcl
parent597252f43536637b89b8ab99353807d4d63bede4 (diff)
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@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 b757709be118..bca7f11e0b32 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;