diff --git a/poppler/DCTStream.cc b/poppler/DCTStream.cc index 90a1377..3c0b505 100644 --- a/poppler/DCTStream.cc +++ b/poppler/DCTStream.cc @@ -222,6 +222,9 @@ int DCTStream::getChars(int nChars, Guchar *buffer) { } int DCTStream::lookChar() { + if (current == NULL) { + return EOF; + } return *current; }