diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-08-07 18:08:41 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-08-07 19:09:33 +0100 |
commit | 7c871225996e814fe5ce513097a8eefca0b9294c (patch) | |
tree | 8baf4542affb6eab48f9f04b2fece2f368e97b84 /pdf | |
parent | d13391b011532794563f0e2c3911ee72eece7c39 (diff) | |
download | mupdf-7c871225996e814fe5ce513097a8eefca0b9294c.tar.xz |
Remove fz_too_deeply_nested.
Rather than specifically checking for the nesting getting too deep and
hence throwing an error, the error handling should do this for itself.
Make it so that we spot the depth being too great in the fz_try() and
throw to the fz_catch().
Diffstat (limited to 'pdf')
-rw-r--r-- | pdf/pdf_parse.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/pdf/pdf_parse.c b/pdf/pdf_parse.c index 6f27099f..dd710891 100644 --- a/pdf/pdf_parse.c +++ b/pdf/pdf_parse.c @@ -244,9 +244,6 @@ pdf_parse_array(pdf_document *xref, fz_stream *file, pdf_lexbuf *buf) break; case PDF_TOK_OPEN_ARRAY: - if (fz_too_deeply_nested(ctx)) - fz_throw(ctx, "nested too deep, not parsing array"); - obj = pdf_parse_array(xref, file, buf); pdf_array_push(ary, obj); pdf_drop_obj(obj); @@ -254,9 +251,6 @@ pdf_parse_array(pdf_document *xref, fz_stream *file, pdf_lexbuf *buf) break; case PDF_TOK_OPEN_DICT: - if (fz_too_deeply_nested(ctx)) - fz_throw(ctx, "nested too deep, not parsing dict"); - obj = pdf_parse_dict(xref, file, buf); pdf_array_push(ary, obj); pdf_drop_obj(obj); @@ -354,16 +348,10 @@ pdf_parse_dict(pdf_document *xref, fz_stream *file, pdf_lexbuf *buf) switch (tok) { case PDF_TOK_OPEN_ARRAY: - if (fz_too_deeply_nested(ctx)) - fz_throw(ctx, "nested too deep, not parsing array"); - val = pdf_parse_array(xref, file, buf); break; case PDF_TOK_OPEN_DICT: - if (fz_too_deeply_nested(ctx)) - fz_throw(ctx, "nested too deep, not parsing array"); - val = pdf_parse_dict(xref, file, buf); break; |