diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-07-05 02:11:57 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-07-05 02:28:39 +0800 |
commit | 502e56243e3bf70d95b85f67639001b26fdb1528 (patch) | |
tree | 3e5ee45f34afb6e700592b1ad782f0a34c076cd1 /source/fitz/pixmap.c | |
parent | 5da66a0fca3475720bad085eb6d630e4e9b79e11 (diff) | |
download | mupdf-502e56243e3bf70d95b85f67639001b26fdb1528.tar.xz |
Fix bug in optimized clearing of CMYK pixmaps.
The implementation assumed that a variable contained a number of
32-bit words when it actually contained the number of bytes hence
fz_clear_pixmap_with_value() touched memory outside of the samples
array.
Diffstat (limited to 'source/fitz/pixmap.c')
-rw-r--r-- | source/fitz/pixmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/fitz/pixmap.c b/source/fitz/pixmap.c index 6a7f8919..d278900a 100644 --- a/source/fitz/pixmap.c +++ b/source/fitz/pixmap.c @@ -368,7 +368,7 @@ clear_cmyk_bitmap(unsigned char *samples, int w, int h, int stride, int value, i const uint32_t a0 = d.word; while (h--) { - size_t WW = W; + size_t WW = W >> 2; while (WW--) { *s++ = a0; |