diff options
author | William Bader <william@newspapersystems.com> | 2020-09-13 05:22:19 +0100 |
---|---|---|
committer | William Bader <william@newspapersystems.com> | 2020-09-13 05:22:19 +0100 |
commit | 12303bbdcc0cc72c6ff641140856f2c1f51041b8 (patch) | |
tree | 39922ec016fcee7b7c6b874e4df6612b2c36f677 | |
parent | e2ecddf3fc1f93a68b0ae535813f8b0d5ec672b5 (diff) |
Improve EmbedStream::reset error checking.
-rw-r--r-- | poppler/Stream.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/poppler/Stream.cc b/poppler/Stream.cc index 2b3eba85..2220f29c 100644 --- a/poppler/Stream.cc +++ b/poppler/Stream.cc @@ -1090,7 +1090,12 @@ void EmbedStream::reset() str->reset(); // Might be a FilterStream that does not support str->setPos(start) while (str->getPos() < start) { - str->getChar(); + if (str->getChar() == EOF) { + break; + } + } + if (str->getPos() != start) { + error(errInternal, -1, "Failed to reset EmbedStream"); } } record = false; |