commit - 79dc4dd64dee4c459207a6f7c8c1cd18c824fda7
commit + 86fecbce404a9379c4e33837101ba43713fcc9bb
blob - d4b299da2f823e3a5394cfbf9c7ae8860a9fc490
blob + fc41174066a20089dd8043518b6c4f7c3a790484
--- pdf.c
+++ pdf.c
//res = h_parse(p_xref, input + offset, sz - offset);
HParser *p = h_right(h_seek(offset * 8, SEEK_SET), p_xref); // XXX
res = h_parse(p, input, sz);
- if (res == NULL) {
+ if (res == NULL || res->ast == NULL || H_INDEX_TOKEN(res->ast, 0) == NULL) {
fprintf(stderr, "%s: error parsing xref section at "
"position %zu (%#zx)\n", infile, offset, offset);
break;
}
- assert(res->ast != NULL);
/* save this section in xrefs */
if (n >= SIZE_MAX / sizeof(HParsedToken *))