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

ofz#3744 Undefined-shift

Change-Id: I4b3445c0ee50b9b50edba464da7ad61cda625d3e
Reviewed-on: https://gerrit.libreoffice.org/43755Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 48a4cf10
...@@ -666,7 +666,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* ) ...@@ -666,7 +666,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
for (long y = 0; bIsValid && y < nHeight; ++y) for (long y = 0; bIsValid && y < nHeight; ++y)
{ {
int nBitsLeft = 0; int nBitsLeft = 0;
for (long x = 0; bIsValid && x < nWidth; ++x) for (long x = 0; x < nWidth; ++x)
{ {
if ( --nBitsLeft < 0 ) if ( --nBitsLeft < 0 )
{ {
...@@ -711,6 +711,8 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* ) ...@@ -711,6 +711,8 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
} }
} }
} }
if (!bIsValid)
break;
if ( nBitDepth == 1 ) if ( nBitDepth == 1 )
pAcc->SetPixelIndex( y, x, static_cast<sal_uInt8>(nDat >> nBitsLeft) & 1 ); pAcc->SetPixelIndex( y, x, static_cast<sal_uInt8>(nDat >> nBitsLeft) & 1 );
else else
......
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