Kaydet (Commit) 651e1f6c authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz: divide-by-zero

Change-Id: Ie9a21a1432a98af3dca9a397057b7887ff30375f
üst 00d24735
...@@ -1345,11 +1345,21 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic ) ...@@ -1345,11 +1345,21 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
else else
nPlanes = nSamplesPerPixel; nPlanes = nSamplesPerPixel;
bStatus = nPlanes != 0;
}
sal_uInt32 nDiv = GetRowsPerStrip() + 1;
if ( bStatus )
{
bStatus = (nDiv != 0);
}
if ( bStatus )
{
if ( ( nFillOrder == 2 ) && ( nCompression != 5 ) ) // in the LZW mode bits are already being inverted if ( ( nFillOrder == 2 ) && ( nCompression != 5 ) ) // in the LZW mode bits are already being inverted
bByteSwap = true; bByteSwap = true;
nStripsPerPlane = ( nImageLength - 1 ) / nDiv;
nStripsPerPlane = ( nImageLength - 1 ) / GetRowsPerStrip() + 1;
bStatus = nPlanes != 0;
} }
if ( bStatus ) if ( bStatus )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment