diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-19 21:25:46 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-03 17:51:30 +0200 |
commit | 6b29ec0aae6d39aaf090d8ced33e650921b7552e (patch) | |
tree | fec032c5ae9a8826b6c77d554f5781499015a549 /filter/source | |
parent | 4b53c1e82f3788603277f758e7d118451058aabd (diff) |
check np bounds
(cherry picked from commit be4e1141be7cd54cf5362d3de534050db5505437)
Change-Id: Id16ae9325f3c67792941b9c88d83435aa98282ca
Reviewed-on: https://gerrit.libreoffice.org/17200
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'filter/source')
-rw-r--r-- | filter/source/graphicfilter/itiff/itiff.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index 6d1be661dd5b..dc556f30b2b5 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -619,6 +619,8 @@ bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent ) pTIFF->Seek( pStripOffsets[ nStrip ] ); aCCIDecom.StartDecompression( *pTIFF ); } + if (np >= SAL_N_ELEMENTS(pMap)) + return false; if ( aCCIDecom.DecompressScanline( pMap[ np ], nImageWidth * nBitsPerSample * nSamplesPerPixel / nPlanes, np + 1 == nPlanes ) == false ) return false; if ( pTIFF->GetError() ) |