ofz: don't read data that isn't there

Change-Id: I7fdcb78bde8f650c1a57d34177d8993a6d8a0a2f
This commit is contained in:
Caolán McNamara 2017-02-23 11:05:40 +00:00
parent 46b1b5dd2a
commit ee619fb344

View File

@ -995,6 +995,12 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY)
{
sal_uInt32 nByteCount = nImageWidth >> 3;
sal_uInt32 nBytesNeeded = nByteCount;
if (nImageWidth & 7)
++nBytesNeeded;
if (pt + nBytesNeeded > ptend)
return false;
if ( bByteSwap )
{
sal_Int32 nx = 0;