diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-09-18 19:39:12 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-09-19 19:58:25 +0800 |
commit | 73613ba7ab79ab8bc9e1a6d92ad1c98ca154908c (patch) | |
tree | bd9d6586d2e31b6a49548e53ae1a81ce888dd651 /source/fitz | |
parent | 9d8ab86fd62475478a9fb8efbcbdef534fe18026 (diff) | |
download | mupdf-73613ba7ab79ab8bc9e1a6d92ad1c98ca154908c.tar.xz |
jpx: Fix off by one in palettized images.
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 490265f9..a1430973 100644 --- a/source/fitz/load-jpx.c +++ b/source/fitz/load-jpx.c @@ -93,7 +93,7 @@ jpx_write(unsigned char * pucData, short sComponent, unsigned long ulRow, { for (x = 0; (ulStart + i) * hstep + x < state->pix->w && x < hstep; x++) { - unsigned char v = fz_clampi(pucData[i], 0, state->palette->ulEntries); + unsigned char v = fz_clampi(pucData[i], 0, state->palette->ulEntries - 1); if (state->expand_indexed) { |