From 9ae29c7a07d0f372dbfc4aca17bbb646126aedb5 Mon Sep 17 00:00:00 2001 From: Thomas Freitag Date: Thu, 21 Nov 2013 23:53:53 +0100 Subject: Don't end loop if reading from GooFile fails Bug #71835 --- poppler/Stream.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/poppler/Stream.cc b/poppler/Stream.cc index 41cb8c1d..8ef061ab 100644 --- a/poppler/Stream.cc +++ b/poppler/Stream.cc @@ -819,6 +819,9 @@ GBool FileStream::fillBuf() { n = fileStreamBufSize; } n = file->read(buf, n, offset); + if (n == -1) { + return gFalse; + } offset += n; bufEnd = buf + n; if (bufPtr >= bufEnd) { -- cgit v1.2.3