aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--qpdf/fix-qdf.cc5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b217b8f3..f7ba4f6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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))
{