diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-10-11 09:08:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-10-11 15:31:07 +0200 |
commit | 2b032b4a40bc3dd89bcf48036f3a24958ea68e06 (patch) | |
tree | 6036106cc3e4c18f73c29079c51d5bb651b6d75d /vcl | |
parent | 043cb0a95a2052150f4c66e3b7330c1a8835bd2c (diff) |
ofz#18110 Timeout
Change-Id: I6fc40d7ae2f93e0168ccfc1fdf1b99cee0ae6ac7
Reviewed-on: https://gerrit.libreoffice.org/80640
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/dibtools.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index d5f1a9a7f8f9..4728a43700d1 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -466,11 +466,9 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header const & rHeader, BitmapWriteA { nRunByte = nCountByte >> 1; - for( sal_uLong i = 0; i < nRunByte; i++ ) + for (sal_uLong i = 0; i < nRunByte && nX < nWidth; ++i) { - if( nX < nWidth ) - rAcc.SetPixelOnData(pScanline, nX++, SanitizePaletteIndex(cTmp >> 4, rPalette, bForceToMonoWhileReading)); - + rAcc.SetPixelOnData(pScanline, nX++, SanitizePaletteIndex(cTmp >> 4, rPalette, bForceToMonoWhileReading)); if( nX < nWidth ) rAcc.SetPixelOnData(pScanline, nX++, SanitizePaletteIndex(cTmp & 0x0f, rPalette, bForceToMonoWhileReading)); } @@ -480,7 +478,7 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header const & rHeader, BitmapWriteA } else { - for( sal_uLong i = 0; ( i < nCountByte ) && ( nX < nWidth ); i++ ) + for (sal_uLong i = 0; i < nCountByte && nX < nWidth; ++i) rAcc.SetPixelOnData(pScanline, nX++, SanitizePaletteIndex(cTmp, rPalette, bForceToMonoWhileReading)); } } |