summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-15 11:29:11 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-05-18 15:17:10 +0200
commit1cbb19e187a981d4f4803aae189ed931d9e03a62 (patch)
tree7a97e32fbf2d1646b96befc52bc9515147cbf7b6 /filter
parent202c5747d23df7fae477f097648135b0bd675c07 (diff)
ofz#1542 check remaining size of dest
Change-Id: I37cff45afdb242b31919a8a02e737424e2ecfd52 Reviewed-on: https://gerrit.libreoffice.org/37763 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 3ab880a9ae3a..954668bdea92 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -654,7 +654,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
long nHeight = ImplGetNumber(pDest, nSecurityCount);
long nBitDepth = ImplGetNumber(pDest, nSecurityCount);
long nScanLines = ImplGetNumber(pDest, nSecurityCount);
- pDest = ImplSearchEntry( pDest, reinterpret_cast<sal_uInt8 const *>("%"), 16, 1 ); // go to the first Scanline
+ pDest = nSecurityCount ? ImplSearchEntry(pDest, reinterpret_cast<sal_uInt8 const *>("%"), 16, 1) : nullptr; // go to the first Scanline
if ( nSecurityCount && pDest && nWidth && nHeight && ( ( nBitDepth == 1 ) || ( nBitDepth == 8 ) ) && nScanLines )
{
rStream.Seek( nBufStartPos + ( pDest - pBuf.get() ) );