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

Bug fix - in QPDF::isLinearized return false if /L is not an integer

This commit is contained in:
m-holger 2024-11-02 15:16:47 +00:00
parent 2e3f54e616
commit 12f7698ea1

View File

@ -128,18 +128,17 @@ QPDF::isLinearized()
return false;
}
QPDFObjectHandle L = candidate.getKey("/L");
if (L.isInteger()) {
qpdf_offset_t Li = L.getIntValue();
m->file->seek(0, SEEK_END);
if (Li != m->file->tell()) {
QTC::TC("qpdf", "QPDF /L mismatch");
return false;
} else {
m->linp.file_size = Li;
}
auto L = candidate.getKey("/L");
if (!L.isInteger()) {
return false;
}
qpdf_offset_t Li = L.getIntValue();
m->file->seek(0, SEEK_END);
if (Li != m->file->tell()) {
QTC::TC("qpdf", "QPDF /L mismatch");
return false;
}
m->linp.file_size = Li;
m->lindict = candidate;
return true;
}