From a444d4bbf001ed68ae36d00970e34309ce17d891 Mon Sep 17 00:00:00 2001 From: Pompolic <pompolic@special-circumstanc.es> Date: Mon, 26 Jul 2021 17:55:15 +0200 Subject: [PATCH] Disable debug postordinate parser --- pdf.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/pdf.c b/pdf.c index d71fe57..ffd7874 100644 --- a/pdf.c +++ b/pdf.c @@ -2135,8 +2135,8 @@ p_stream_data__m(HAllocator *mm__, const Dict *dict) v = dictentry(dict, "Type"); if (v == NULL || v->token_type != TT_BYTES) // XXX -> custom type - return p_raw_test__m(mm__, dict); /* no /Type field */ - // XXX restore return NULL above + //return p_raw_test__m(mm__, dict); /* no /Type field */ + return NULL; /* no /Type field */ /* interpret known stream types */ if (bytes_eq(v->bytes, "XRef")) @@ -2425,24 +2425,17 @@ p_objstm__m(HAllocator *mm__, const Dict *dict) // XXX consistency-check against /First, idx, /N } -HParser* + /* Debug parser to test encoded text streams */ // XXX remove - +/* +HParser* p_raw_test__m(HAllocator *mm__, const Dict *dict) { - /*const HParsedToken *v; - size_t N; - - v = dictentry(dict, "Length"); - if (v == NULL || v->token_type != TT_SINT || v->sint < 0 || - (uint64_t)v->sint > SIZE_MAX) { - fprintf(stderr, "missing /Length on object stream\n"); - return p_fail; - }*/ return h_sequence__m(mm__, h_many__m(mm__, h_uint8__m(mm__)), NULL); } +*/ /* * This continuation is very similar to kstream, except that it does not -- GitLab