[Libreoffice-commits] core.git: filter/source

Caolán McNamara caolanm at redhat.com
Tue Oct 24 15:07:18 UTC 2017


 filter/source/graphicfilter/ieps/ieps.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit da09cf2cb875d17d06c081c744e7a25f4715f8b0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 24 11:57:03 2017 +0100

    ofz#3744 Undefined-shift
    
    Change-Id: I4b3445c0ee50b9b50edba464da7ad61cda625d3e
    Reviewed-on: https://gerrit.libreoffice.org/43755
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index f2b138f550cd..e0cfb913d631 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -666,7 +666,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
                             for (long y = 0; bIsValid && y < nHeight; ++y)
                             {
                                 int nBitsLeft = 0;
-                                for (long x = 0; bIsValid && x < nWidth; ++x)
+                                for (long x = 0; x < nWidth; ++x)
                                 {
                                     if ( --nBitsLeft < 0 )
                                     {
@@ -711,6 +711,8 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
                                             }
                                         }
                                     }
+                                    if (!bIsValid)
+                                        break;
                                     if ( nBitDepth == 1 )
                                         pAcc->SetPixelIndex( y, x, static_cast<sal_uInt8>(nDat >> nBitsLeft) & 1 );
                                     else


More information about the Libreoffice-commits mailing list