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

Fix gratuitous calls to bad_subsections in Xref_table::subsections

This commit is contained in:
m-holger 2024-10-25 11:16:45 +01:00
parent c648b9a018
commit 1eb5df92f4

View File

@ -493,7 +493,7 @@ Xref_table::subsections(std::string& line)
auto offset = std::get<2>(sub);
file->seek(offset + 20 * toO(count) - 1, SEEK_SET);
file->read(line.data(), 1);
if (!(line[0] == '\n' || line[0] == '\n')) {
if (!(line[0] == '\n' || line[0] == '\r')) {
return bad_subsections(line, recovery_offset);
}
qpdf_offset_t pos = file->tell();