diff --git a/pdf.c b/pdf.c index c1652fb3cecf649ef9f0fb67ec86c3f24c612e00..04e077d7770c356c450863f0601ea7238b17d119 100644 --- a/pdf.c +++ b/pdf.c @@ -4374,8 +4374,8 @@ process_page_content(struct Env *aux) // XXX validate the presence of this field elsewhere tok = dictentry(trailer, "Size"); if (tok == NULL || tok->token_type != TT_SINT) { - log_message(5, "VIOLATION[5]: error parsing trailer section!" - "Missing or malformed /Size field.\n"); + log_message(5, "%s: missing or malformed /Size in trailer\n", + aux->infile); return; } Size = H_CAST_SINT(tok); @@ -4968,7 +4968,7 @@ parse_xrefs(const uint8_t *input, size_t sz, size_t *nxrefs) break; } if (res == NULL) { - log_message(5, "VIOLATION[5]: startxref not found\n"); + log_message(5, "%s: startxref not found\n", infile); goto end; } offset = H_INDEX_UINT(res->ast, 0); @@ -4979,8 +4979,8 @@ parse_xrefs(const uint8_t *input, size_t sz, size_t *nxrefs) // verify the offset recovered is bounded to be in the file // XXX this check is already present below by virtue of h_seek() if (offset > sz) { - log_message(5, "VIOLATION[5]: startxref at %zu (%#zx) points outside the file\n", - sz - i, sz - i); + log_message(5, "%s: startxref value at %zu (%#zx) points " + "outside the file\n", sz - i, sz - i); goto end; } @@ -4989,8 +4989,8 @@ parse_xrefs(const uint8_t *input, size_t sz, size_t *nxrefs) assert(offset <= sz); res = h_parse(p_xref, input + offset, sz - offset); 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); + log_message(5, "%s: error parsing xref section at " + "position %zu (%#zx)\n", infile, offset, offset); break; }