diff options
author | Sebastian Rasmussen <sebras@hotmail.com> | 2010-06-06 18:11:34 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@hotmail.com> | 2010-06-06 18:11:34 +0200 |
commit | 8ab4fcab672220117c0d07347e8184dcc0aaf4e9 (patch) | |
tree | 0f1fe85439cc666d7c7e08963b40ed6abfed9811 | |
parent | 9aab7bf97f6399e649ccecd70e32060dea4f7855 (diff) | |
download | mupdf-8ab4fcab672220117c0d07347e8184dcc0aaf4e9.tar.xz |
Rely on csi type to define stack depth.
-rw-r--r-- | mupdf/pdf_interpret.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mupdf/pdf_interpret.c b/mupdf/pdf_interpret.c index a0754f0c..a9ffa7b0 100644 --- a/mupdf/pdf_interpret.c +++ b/mupdf/pdf_interpret.c @@ -73,7 +73,7 @@ pdf_gsave(pdf_csi *csi) { pdf_gstate *gs = csi->gstate + csi->gtop; - if (csi->gtop == 31) + if (csi->gtop == nelem(csi->gstate) - 1) { fz_warn("gstate overflow in content stream"); return; @@ -1375,7 +1375,7 @@ pdf_runcsifile(pdf_csi *csi, fz_obj *rdb, fz_stream *file, char *buf, int buflen while (1) { - if (csi->top == 31) + if (csi->top == nelem(csi->stack) - 1) return fz_throw("stack overflow"); error = pdf_lex(&tok, file, buf, buflen, &len); |