Commit cd830968efd9c47cf21226b14094be21a4781024
1 parent
d0b26b83
Eliminate one potential integer overflow
There are more to handle, but this resolves an issue already caught by oss-fuzz.
Showing
1 changed file
with
1 additions
and
1 deletions
libqpdf/QPDF.cc
| ... | ... | @@ -812,7 +812,7 @@ QPDF::read_xrefTable(qpdf_offset_t xref_offset) |
| 812 | 812 | "xref syntax invalid"); |
| 813 | 813 | } |
| 814 | 814 | this->m->file->seek(this->m->file->getLastOffset() + bytes, SEEK_SET); |
| 815 | - for (int i = obj; i < obj + num; ++i) | |
| 815 | + for (qpdf_offset_t i = obj; i - num < obj; ++i) | |
| 816 | 816 | { |
| 817 | 817 | if (i == 0) |
| 818 | 818 | { | ... | ... |