Commit 7caa9ddf5a8b272c94fa5d4c079f2be8eabff983
1 parent
532cc58d
Format code
Showing
6 changed files
with
12 additions
and
10 deletions
libqpdf/QPDF.cc
| ... | ... | @@ -711,8 +711,9 @@ QPDF::read_xref(qpdf_offset_t xref_offset) |
| 711 | 711 | QPDFObjGen last_og{-1, 0}; |
| 712 | 712 | for (auto const& item: m->xref_table) { |
| 713 | 713 | auto id = item.first.getObj(); |
| 714 | - if (id == last_og.getObj() && id > 0) | |
| 714 | + if (id == last_og.getObj() && id > 0) { | |
| 715 | 715 | removeObject(last_og); |
| 716 | + } | |
| 716 | 717 | last_og = item.first; |
| 717 | 718 | } |
| 718 | 719 | } |
| ... | ... | @@ -2413,9 +2414,10 @@ QPDF::getCompressibleObjGens() |
| 2413 | 2414 | if (obj.getObjectID() > 0) { |
| 2414 | 2415 | QPDFObjGen og = obj.getObjGen(); |
| 2415 | 2416 | const size_t id = toS(og.getObj() - 1); |
| 2416 | - if (id >= max_obj) | |
| 2417 | + if (id >= max_obj) { | |
| 2417 | 2418 | throw std::logic_error( |
| 2418 | 2419 | "unexpected object id encountered in getCompressibleObjGens"); |
| 2420 | + } | |
| 2419 | 2421 | if (visited[id]) { |
| 2420 | 2422 | QTC::TC("qpdf", "QPDF loop detected traversing objects"); |
| 2421 | 2423 | continue; | ... | ... |
libqpdf/QPDFJob.cc
| ... | ... | @@ -3097,10 +3097,9 @@ QPDFJob::writeOutfile(QPDF& pdf) |
| 3097 | 3097 | try { |
| 3098 | 3098 | QUtil::remove_file(backup.c_str()); |
| 3099 | 3099 | } catch (QPDFSystemError& e) { |
| 3100 | - *m->log->getError() | |
| 3101 | - << m->message_prefix << ": unable to delete original file (" << e.what() << ");" | |
| 3102 | - << " original file left in " << backup | |
| 3103 | - << ", but the input was successfully replaced\n"; | |
| 3100 | + *m->log->getError() << m->message_prefix << ": unable to delete original file (" | |
| 3101 | + << e.what() << ");" << " original file left in " << backup | |
| 3102 | + << ", but the input was successfully replaced\n"; | |
| 3104 | 3103 | } |
| 3105 | 3104 | } |
| 3106 | 3105 | } | ... | ... |
libqpdf/QPDFParser.cc
| ... | ... | @@ -253,8 +253,9 @@ QPDFParser::parseRemainder(bool content_stream) |
| 253 | 253 | dict[frame->key] = QPDF_Null::create(); |
| 254 | 254 | } |
| 255 | 255 | |
| 256 | - if (!frame->olist.empty()) | |
| 256 | + if (!frame->olist.empty()) { | |
| 257 | 257 | fixMissingKeys(); |
| 258 | + } | |
| 258 | 259 | |
| 259 | 260 | if (!frame->contents_string.empty() && dict.count("/Type") && |
| 260 | 261 | dict["/Type"].isNameAndEquals("/Sig") && dict.count("/ByteRange") && | ... | ... |
libqpdf/QPDF_Array.cc
libqpdf/qpdf/Pl_TIFFPredictor.hh
libtests/json.cc
| ... | ... | @@ -137,7 +137,7 @@ test_main() |
| 137 | 137 | // Check default constructed JSON object (order as per JSON.hh). |
| 138 | 138 | JSON uninitialized; |
| 139 | 139 | std::string ws; |
| 140 | - auto pl = Pl_String ("", nullptr, ws); | |
| 140 | + auto pl = Pl_String("", nullptr, ws); | |
| 141 | 141 | uninitialized.write(&pl); |
| 142 | 142 | assert(ws == "null"); |
| 143 | 143 | assert(uninitialized.unparse() == "null"); | ... | ... |