diff options
-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)) { |