From 1eb5df92f49111e2ef1b9d0d8f12b849720b08c6 Mon Sep 17 00:00:00 2001 From: m-holger Date: Fri, 25 Oct 2024 11:16:45 +0100 Subject: [PATCH] Fix gratuitous calls to bad_subsections in Xref_table::subsections --- libqpdf/QPDF_objects.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libqpdf/QPDF_objects.cc b/libqpdf/QPDF_objects.cc index 63eb13a4..9e82df99 100644 --- a/libqpdf/QPDF_objects.cc +++ b/libqpdf/QPDF_objects.cc @@ -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();