diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-09-21 00:11:22 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-09-21 00:11:22 +0200 |
commit | 69ed4a8f4dbfac7f2f1de925e34807e4fee3b27c (patch) | |
tree | b7f82296a259d360ce90f0826e475321d630a222 /fitz/filt_dctd.c | |
parent | 99ba154018b7c4a2c47b4c7e721ffe6d9164f9f3 (diff) | |
download | mupdf-69ed4a8f4dbfac7f2f1de925e34807e4fee3b27c.tar.xz |
Don't thread ctx through safe fz_obj functions.
Diffstat (limited to 'fitz/filt_dctd.c')
-rw-r--r-- | fitz/filt_dctd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fitz/filt_dctd.c b/fitz/filt_dctd.c index 94a06afb..7efbac91 100644 --- a/fitz/filt_dctd.c +++ b/fitz/filt_dctd.c @@ -208,16 +208,16 @@ fz_open_dctd(fz_stream *chain, fz_obj *params) fz_dctd *state; fz_obj *obj; - assert(chain); - state = fz_calloc(chain->ctx, 1, sizeof(fz_dctd)); - state->ctx = chain->ctx; + state = fz_malloc(chain->ctx, sizeof(fz_dctd)); + memset(state, 0, sizeof(fz_dctd)); + state->ctx = chain->ctx; state->chain = chain; state->color_transform = -1; /* unset */ state->init = 0; - obj = fz_dict_gets(chain->ctx, params, "ColorTransform"); + obj = fz_dict_gets(params, "ColorTransform"); if (obj) - state->color_transform = fz_to_int(chain->ctx, obj); + state->color_transform = fz_to_int(obj); return fz_new_stream(chain->ctx, state, read_dctd, close_dctd); } |