summaryrefslogtreecommitdiff
path: root/libavcodec/tiff.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-01-12 19:37:18 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-01-20 21:42:20 +0100
commitec28a85107cccece4dce17c0ccb633defe2d6e98 (patch)
tree0e2d41d75e1fdbb596c102ce349cdb5ec129222a /libavcodec/tiff.c
parentf64c0dffa13e6263de3fdff0058ab2fdb03ac1d6 (diff)
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>
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r--libavcodec/tiff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 5a4271c012..112f5b52f4 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -619,7 +619,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);