mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-03 07:12:28 +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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPDFObjectHandle L = candidate.getKey("/L");
|
auto L = candidate.getKey("/L");
|
||||||
if (L.isInteger()) {
|
if (!L.isInteger()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
qpdf_offset_t Li = L.getIntValue();
|
qpdf_offset_t Li = L.getIntValue();
|
||||||
m->file->seek(0, SEEK_END);
|
m->file->seek(0, SEEK_END);
|
||||||
if (Li != m->file->tell()) {
|
if (Li != m->file->tell()) {
|
||||||
QTC::TC("qpdf", "QPDF /L mismatch");
|
QTC::TC("qpdf", "QPDF /L mismatch");
|
||||||
return false;
|
return false;
|
||||||
} else {
|
}
|
||||||
m->linp.file_size = Li;
|
m->linp.file_size = Li;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m->lindict = candidate;
|
m->lindict = candidate;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user