diff options
-rw-r--r-- | poppler/Stream.cc | 3 |
1 files changed, 3 insertions, 0 deletions
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) { |