From f844fce33a0bdff13cb94ca9ab463ae1ef33bc3b Mon Sep 17 00:00:00 2001 From: "Sven M. Hallberg" <pesco@khjk.org> Date: Tue, 28 Mar 2023 17:44:29 +0000 Subject: [PATCH] allow partial results from parse_xrefs This was intended to be a 'break' statement, returning any xref sections parsed up to that point. Note that parse_xrefs() is *not* supposed to be the validating parser proper for the document. It is a utility that is needed before the actual parser can run, so if it returns partial data in a best effort, that is fine. --- pdf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdf.c b/pdf.c index 7578864..a193e66 100644 --- a/pdf.c +++ b/pdf.c @@ -4933,7 +4933,7 @@ parse_xrefs(struct Env *aux) if (res == NULL || res->ast == NULL || H_INDEX_TOKEN(res->ast, 0) == NULL) { log_message(5, "VIOLATION[5]: error parsing xref section at " "position %zu (%#zx)\n", offset, offset); - return; + break; } /* save this section in xrefs */ -- GitLab