diff options
author | Jay Berkenbilt <ejb@ql.org> | 2020-10-23 10:02:53 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2020-10-23 12:39:42 +0200 |
commit | 0dea2769978d52e56e270fdc5ca868e0f2223cb0 (patch) | |
tree | 452af037e788790c5d5e4dccf3267e664daf82df | |
parent | 802de87c308cbcc0d3fb473a0d646a8ba1dd97c7 (diff) | |
download | qpdf-0dea2769978d52e56e270fdc5ca868e0f2223cb0.tar.zst |
Fix fix-qdf for empty streams
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | qpdf/fix-qdf.cc | 5 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2020-10-23 Jay Berkenbilt <ejb@ql.org> + + * Bug fix: fix-qdf: properly handle empty streams with ignore + newline. + 2020-10-22 Jay Berkenbilt <ejb@ql.org> * Fix loop detection problem when traversing page thumbnails diff --git a/qpdf/fix-qdf.cc b/qpdf/fix-qdf.cc index c83b495a..886242d9 100644 --- a/qpdf/fix-qdf.cc +++ b/qpdf/fix-qdf.cc @@ -294,7 +294,10 @@ QdfFixer::processLines(std::list<std::string>& lines) { if (matches(re_ignore_newline)) { - --stream_length; + if (stream_length > 0) + { + --stream_length; + } } else if (matches(re_n_0_obj)) { |