diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2018-02-05 18:26:12 +0100 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2018-02-06 13:26:13 +0100 |
commit | 86b5034359a45254e1f07eca84469db0d44005ad (patch) | |
tree | d5f0331f9aa2a66033da7342bafaf2b79f442643 /source | |
parent | 90421d4cd157c743264643794a5522a1dd46eda9 (diff) | |
download | mupdf-86b5034359a45254e1f07eca84469db0d44005ad.tar.xz |
Bug 698989: Throw upon unsupported bpc when unpacking image.
Previously mupdf would silently ignore this situation and leave the
buffer uninitialized leading to further issues. Thanks to oss-fuzz
for reporting.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/draw-unpack.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/fitz/draw-unpack.c b/source/fitz/draw-unpack.c index 2b6a241e..7544c5ac 100644 --- a/source/fitz/draw-unpack.c +++ b/source/fitz/draw-unpack.c @@ -190,6 +190,8 @@ fz_unpack_tile(fz_context *ctx, fz_pixmap *dst, unsigned char * restrict src, in case 16: *dp++ = get16(sp, b); break; case 24: *dp++ = get24(sp, b); break; case 32: *dp++ = get32(sp, b); break; + default: + fz_throw(ctx, FZ_ERROR_GENERIC, "cannot unpack tile with %d bits per component", depth); } b++; } |