diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 1b332a754d..9c13a758ee 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);