diff options
author | Jay Berkenbilt <ejb@ql.org> | 2017-09-12 21:48:08 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2017-09-12 22:03:48 +0200 |
commit | d31a7b76e7fa6fc6fa31d94394b59f990920d09c (patch) | |
tree | ae2c107d061eddbad986f059230dda08f296abf6 /libqpdf/QPDF_Stream.cc | |
parent | eaacf94005ff8189e215447ffeadc341eca6c019 (diff) | |
download | qpdf-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_Stream.cc')
-rw-r--r-- | libqpdf/QPDF_Stream.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libqpdf/QPDF_Stream.cc b/libqpdf/QPDF_Stream.cc index 27c6b477..cf26f001 100644 --- a/libqpdf/QPDF_Stream.cc +++ b/libqpdf/QPDF_Stream.cc @@ -94,7 +94,7 @@ PointerHolder<Buffer> QPDF_Stream::getStreamData(qpdf_stream_decode_level_e decode_level) { Pl_Buffer buf("stream data buffer"); - if (! pipeStreamData(&buf, 0, decode_level, false)) + if (! pipeStreamData(&buf, 0, decode_level, false, false)) { throw std::logic_error("getStreamData called on unfilterable stream"); } @@ -106,7 +106,7 @@ PointerHolder<Buffer> QPDF_Stream::getRawStreamData() { Pl_Buffer buf("stream data buffer"); - pipeStreamData(&buf, 0, qpdf_dl_none, false); + pipeStreamData(&buf, 0, qpdf_dl_none, false, false); QTC::TC("qpdf", "QPDF_Stream getRawStreamData"); return buf.getBuffer(); } @@ -373,7 +373,7 @@ bool QPDF_Stream::pipeStreamData(Pipeline* pipeline, unsigned long encode_flags, qpdf_stream_decode_level_e decode_level, - bool suppress_warnings) + bool suppress_warnings, bool will_retry) { std::vector<std::string> filters; int predictor = 1; @@ -540,7 +540,8 @@ QPDF_Stream::pipeStreamData(Pipeline* pipeline, if (! QPDF::Pipe::pipeStreamData(this->qpdf, this->objid, this->generation, this->offset, this->length, this->stream_dict, pipeline, - suppress_warnings)) + suppress_warnings, + will_retry)) { filter = false; } |