commit 1afde767c483e9672beed15c549717de2db061da from: Sven M. Hallberg date: Fri Apr 14 11:47:57 2023 UTC print an error message if /Root not found If we are actually processing page content, that is. commit - f0c8a4732e52479072004950a488c09a892c0d58 commit + 1afde767c483e9672beed15c549717de2db061da blob - a7697b557e16a68b17e9e2d35c808a22d0e509fa blob + ae4efb7cda41a6f3dd668bb740de9e303daf1eac --- pdf.c +++ pdf.c @@ -4397,8 +4397,12 @@ process_page_content(struct Env *aux) /* process the document starting from the /Root object */ tok = dictentry(trailer, "Root"); - if (tok != NULL && tok->token_type == TT_Ref) - parse_catalog(aux, tok); + if (tok == NULL || tok->token_type != TT_Ref) { + log_message(5, "%s: missing or malformed /Root in trailer\n", + aux->infile); + return; // XXX return an error code! + } + parse_catalog(aux, tok); }