diff options
author | Jay Berkenbilt <ejb@ql.org> | 2017-07-29 18:07:19 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2017-07-29 18:19:04 +0200 |
commit | 6a7d53ad2bc9c7eb5964b5c0424616e8b3f068cd (patch) | |
tree | edc61faa65a5f967e4dc229549b407eff65f99ad /libqpdf/QPDF.cc | |
parent | 07d6f770b2a1c731cdf4f981ddc01466dbbc4ba0 (diff) | |
download | qpdf-6a7d53ad2bc9c7eb5964b5c0424616e8b3f068cd.tar.zst |
Handle zlib data errors better (fixes #106)
Diffstat (limited to 'libqpdf/QPDF.cc')
-rw-r--r-- | libqpdf/QPDF.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index 56555261..bda87f01 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -2206,7 +2206,7 @@ QPDF::pipeStreamData(int objid, int generation, warn(e); } } - catch (std::runtime_error& e) + catch (std::exception& e) { if (! suppress_warnings) { @@ -2218,7 +2218,14 @@ QPDF::pipeStreamData(int objid, int generation, QUtil::int_to_string(generation) + ": " + e.what())); } } - pipeline->finish(); + try + { + pipeline->finish(); + } + catch (std::exception&) + { + // ignore + } return success; } |