diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-10-30 01:41:24 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-12-14 20:39:20 +0100 |
commit | bcd2fbe6337eb4a3a32f5ebbe7cfabd87328f677 (patch) | |
tree | fc14937f4f89704b36557ba2cbf34850df916035 /source | |
parent | 1156c903a59abfe1bf5c4482f1216a5f96d8a3c1 (diff) | |
download | mupdf-bcd2fbe6337eb4a3a32f5ebbe7cfabd87328f677.tar.xz |
jpx: Quietly limit number of components for openjpeg decoder.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/load-jpx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c index caa4426f..e947f5d5 100644 --- a/source/fitz/load-jpx.c +++ b/source/fitz/load-jpx.c @@ -767,7 +767,7 @@ jpx_read_image(fz_context *ctx, fz_jpxd *state, unsigned char *data, size_t size max_w = jpx->comps[0].w; max_h = jpx->comps[0].h; - for (k = 1; k < (int)jpx->numcomps; k++) + for (k = 1; k < n + a; k++) { if (max_w < jpx->comps[k].w) max_w = jpx->comps[k].w; @@ -785,7 +785,7 @@ jpx_read_image(fz_context *ctx, fz_jpxd *state, unsigned char *data, size_t size } } - for (k = 0; k < (int)jpx->numcomps; k++) + for (k = 0; k < n + a; k++) { sub_w[k] = l2subfactor(ctx, max_w, jpx->comps[k].w); sub_h[k] = l2subfactor(ctx, max_h, jpx->comps[k].h); |