aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2017-09-12 21:48:08 +0200
committerJay Berkenbilt <ejb@ql.org>2017-09-12 22:03:48 +0200
commitd31a7b76e7fa6fc6fa31d94394b59f990920d09c (patch)
treeae2c107d061eddbad986f059230dda08f296abf6 /libqpdf/QPDF.cc
parenteaacf94005ff8189e215447ffeadc341eca6c019 (diff)
downloadqpdf-d31a7b76e7fa6fc6fa31d94394b59f990920d09c.tar.zst
Improve message for stream decoding error
Tweak the message so that we inform the user that we are mitigating data loss.
Diffstat (limited to 'libqpdf/QPDF.cc')
-rw-r--r--libqpdf/QPDF.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc
index bea83c98..1ec0d6b6 100644
--- a/libqpdf/QPDF.cc
+++ b/libqpdf/QPDF.cc
@@ -2382,7 +2382,8 @@ QPDF::pipeStreamData(int objid, int generation,
qpdf_offset_t offset, size_t length,
QPDFObjectHandle stream_dict,
Pipeline* pipeline,
- bool suppress_warnings)
+ bool suppress_warnings,
+ bool will_retry)
{
bool success = false;
std::vector<PointerHolder<Pipeline> > to_delete;
@@ -2430,6 +2431,13 @@ QPDF::pipeStreamData(int objid, int generation,
"error decoding stream data for object " +
QUtil::int_to_string(objid) + " " +
QUtil::int_to_string(generation) + ": " + e.what()));
+ if (will_retry)
+ {
+ warn(QPDFExc(qpdf_e_damaged_pdf, this->m->file->getName(),
+ "", this->m->file->getLastOffset(),
+ "stream will be re-processed without"
+ " filtering to avoid data loss"));
+ }
}
}
if (! success)