mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 10:58:58 +00:00
Check integer overflow in resolveObjectsInStream
Fixes a crash found by fuzzing.
This commit is contained in:
parent
9a3791c53b
commit
153060a0c5
@ -2151,8 +2151,8 @@ QPDF::resolveObjectsInStream(int obj_stream_number)
|
||||
}
|
||||
|
||||
int num = QUtil::string_to_int(tnum.getValue().c_str());
|
||||
int offset = QUtil::string_to_int(toffset.getValue().c_str());
|
||||
offsets[num] = offset + first;
|
||||
long long offset = QUtil::string_to_int(toffset.getValue().c_str());
|
||||
offsets[num] = QIntC::to_int(offset + first);
|
||||
}
|
||||
|
||||
// To avoid having to read the object stream multiple times, store
|
||||
|
Loading…
Reference in New Issue
Block a user