diff options
-rw-r--r-- | mupdf/pdf_xref.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mupdf/pdf_xref.c b/mupdf/pdf_xref.c index 1d7dbc3a..96534845 100644 --- a/mupdf/pdf_xref.c +++ b/mupdf/pdf_xref.c @@ -247,6 +247,8 @@ pdf_readoldxref(fz_obj **trailerp, pdf_xref *xref, char *buf, int cap) xref->table[i].ofs = atoi(s); xref->table[i].gen = atoi(s + 11); xref->table[i].type = s[17]; + if (s[17] != 'f' && s[17] != 'n' && s[17] != 'o') + return fz_throw("unexpected xref type: %#x (%d %d R)", s[17], i, xref->table[i].gen); } } } |