summaryrefslogtreecommitdiff
path: root/fitz/filt_jbig2d.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-12-08 15:32:03 +0100
committerTor Andersson <tor.andersson@artifex.com>2011-12-08 21:46:55 +0100
commit34c971b594bad41fa6c2ad4a9798e5a18de129b5 (patch)
tree0c3956c35f827d1649e0520abf18974a4e0ec8e2 /fitz/filt_jbig2d.c
parente64a57b1e9c2ba6c6f54eff73c414be9e78dafbe (diff)
downloadmupdf-34c971b594bad41fa6c2ad4a9798e5a18de129b5.tar.xz
Throw exceptions for read errors.
Diffstat (limited to 'fitz/filt_jbig2d.c')
-rw-r--r--fitz/filt_jbig2d.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fitz/filt_jbig2d.c b/fitz/filt_jbig2d.c
index 18aa0a22..e2ae4d93 100644
--- a/fitz/filt_jbig2d.c
+++ b/fitz/filt_jbig2d.c
@@ -56,8 +56,6 @@ read_jbig2d(fz_stream *stm, unsigned char *buf, int len)
while (1)
{
n = fz_read(state->chain, tmp, sizeof tmp);
- if (n < 0)
- return fz_error_note(n, "read error in jbig2 filter");
if (n == 0)
break;
jbig2_data_in(state->ctx, tmp, n);
@@ -67,7 +65,7 @@ read_jbig2d(fz_stream *stm, unsigned char *buf, int len)
state->page = jbig2_page_out(state->ctx);
if (!state->page)
- return fz_error_make("jbig2_page_out failed");
+ fz_throw(stm->ctx, "jbig2_page_out failed");
}
s = state->page->data;