Skip to content
forked from qpdf/qpdf

Commit

Permalink
Add sanity check for xref stream /Size entry
Browse files Browse the repository at this point in the history
  • Loading branch information
m-holger committed Sep 27, 2024
1 parent 529501a commit 1b6a504
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libqpdf/QPDF.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,9 @@ QPDF::Xref_table::process_stream(qpdf_offset_t xref_offset, QPDFObjectHandle& xr

if (!trailer_) {
trailer_ = dict;
if (size > toS(max_id_)) {
throw damaged("Cross-reference stream /Size entry is impossibly large");
}
table.resize(size);
}

Expand Down

0 comments on commit 1b6a504

Please sign in to comment.