From 7caa9ddf5a8b272c94fa5d4c079f2be8eabff983 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 4 Feb 2024 16:11:53 -0500 Subject: Format code --- libqpdf/QPDF.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libqpdf/QPDF.cc') diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index 01158ce2..fdd75359 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -711,8 +711,9 @@ QPDF::read_xref(qpdf_offset_t xref_offset) QPDFObjGen last_og{-1, 0}; for (auto const& item: m->xref_table) { auto id = item.first.getObj(); - if (id == last_og.getObj() && id > 0) + if (id == last_og.getObj() && id > 0) { removeObject(last_og); + } last_og = item.first; } } @@ -2413,9 +2414,10 @@ QPDF::getCompressibleObjGens() if (obj.getObjectID() > 0) { QPDFObjGen og = obj.getObjGen(); const size_t id = toS(og.getObj() - 1); - if (id >= max_obj) + if (id >= max_obj) { throw std::logic_error( "unexpected object id encountered in getCompressibleObjGens"); + } if (visited[id]) { QTC::TC("qpdf", "QPDF loop detected traversing objects"); continue; -- cgit v1.2.3-54-g00ecf