filter/source/graphicfilter/ieps/ieps.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 8809915132522a2a05aab0020a6c424c271fcf6b
Author: Caolán McNamara <caol...@redhat.com>
Date:   Tue Oct 10 17:43:08 2017 +0100

    tighten eps preview search
    
    Change-Id: I61e870dc408564b889c2ef115191f34c99286f2a
    Reviewed-on: https://gerrit.libreoffice.org/43323
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/filter/source/graphicfilter/ieps/ieps.cxx 
b/filter/source/graphicfilter/ieps/ieps.cxx
index 4c9f66e49ab7..b74f0805bab2 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -669,8 +669,11 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, 
FilterConfigItem* )
                                     {
                                         while ( bIsValid && ( nBitsLeft != 7 ) 
)
                                         {
-                                            rStream.ReadChar( nByte );
-                                            switch ( nByte )
+                                            rStream.ReadChar(nByte);
+                                            bIsValid = rStream.good();
+                                            if (!bIsValid)
+                                                break;
+                                            switch (nByte)
                                             {
                                                 case 0x0a :
                                                     if ( --nScanLines < 0 )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to