diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-10 17:43:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-11 10:36:01 +0200 |
commit | 8809915132522a2a05aab0020a6c424c271fcf6b (patch) | |
tree | aa2e14a103f880f6a2f78a99c46d3a1900ae17ad | |
parent | 68a41746093cad4307fe582d2c907d7b609b4498 (diff) |
tighten eps preview search
Change-Id: I61e870dc408564b889c2ef115191f34c99286f2a
Reviewed-on: https://gerrit.libreoffice.org/43323
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | filter/source/graphicfilter/ieps/ieps.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
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 ) |