diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2017-06-03 10:58:11 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2017-06-03 11:03:08 +0800 |
commit | e0e13b9a00093ee7cbe64356dcb4f9f64d73afc8 (patch) | |
tree | d1b0df9cc55150a24d806f1b21fd745de1d2357e /source/fitz | |
parent | 9ae994a130a66a375e9ff2d85f6d5d079eeb0adb (diff) | |
download | mupdf-e0e13b9a00093ee7cbe64356dcb4f9f64d73afc8.tar.xz |
jpx: Use subsampled width when reading subsampled data.
This bug caused an indeterminism with issue726.j2k.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/load-jpx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c index e661ba2e..b03f26ce 100644 --- a/source/fitz/load-jpx.c +++ b/source/fitz/load-jpx.c @@ -823,7 +823,7 @@ jpx_read_image(fz_context *ctx, fz_jpxd *state, unsigned char *data, size_t size { int sh = sub_h[k]; int sw = sub_w[k]; - int yy = (y>>sh) * jpx->comps[k].w; + int yy = (y>>sh) * (jpx->comps[k].w >> sw); OPJ_INT32 *data = &jpx->comps[k].data[yy]; for (x = 0; x < w; x ++) { |