2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 02:49:00 +00:00

Add sanity check for xref stream /Size entry

This commit is contained in:
m-holger 2024-09-28 00:25:31 +01:00
parent 529501aa41
commit 1b6a504d42

View File

@ -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);
}