mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 10:58:58 +00:00
Add sanity check for xref stream /Size entry
This commit is contained in:
parent
529501aa41
commit
1b6a504d42
@ -1295,6 +1295,9 @@ QPDF::Xref_table::process_stream(qpdf_offset_t xref_offset, QPDFObjectHandle& xr
|
|||||||
|
|
||||||
if (!trailer_) {
|
if (!trailer_) {
|
||||||
trailer_ = dict;
|
trailer_ = dict;
|
||||||
|
if (size > toS(max_id_)) {
|
||||||
|
throw damaged("Cross-reference stream /Size entry is impossibly large");
|
||||||
|
}
|
||||||
table.resize(size);
|
table.resize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user