diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-01-12 19:37:18 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-01-21 07:53:26 +0100 |
commit | 552733d48ba591eb8d6821da428ee2ef42429e49 (patch) | |
tree | d2a4f5ff51aecdb320ca1e29ddf024896b501f65 /libavcodec | |
parent | a8b5990f4594d511a854f7d9920573d33c85253a (diff) | |
download | ffmpeg-552733d48ba591eb8d6821da428ee2ef42429e49.tar.gz |
avcodec/tiff: Check for 12bit gray fax
Fixes: Assertion failure
Fixes: 11898/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5759794191794176
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ec28a85107cccece4dce17c0ccb633defe2d6e98)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/tiff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index d5b88923fd..bf17d9fe60 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -571,7 +571,7 @@ static int tiff_unpack_strip(TiffContext *s, AVFrame *p, uint8_t *dst, int strid if (s->compr == TIFF_CCITT_RLE || s->compr == TIFF_G3 || s->compr == TIFF_G4) { - if (is_yuv) + if (is_yuv || p->format == AV_PIX_FMT_GRAY12) return AVERROR_INVALIDDATA; return tiff_unpack_fax(s, dst, stride, src, size, width, lines); |