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:
parent
2e3f54e616
commit
12f7698ea1
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user