[FFmpeg-cvslog] avcodec/tiff: Check for 12bit gray fax
Michael Niedermayer
git at videolan.org
Thu Mar 28 18:33:47 EET 2019
ffmpeg | branch: release/3.4 | Michael Niedermayer <michael at niedermayer.cc> | Sat Jan 12 19:37:18 2019 +0100| [23f6170f1bdb54151638b0f76e39267781bc0405] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit ec28a85107cccece4dce17c0ccb633defe2d6e98)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23f6170f1bdb54151638b0f76e39267781bc0405
---
libavcodec/tiff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
More information about the ffmpeg-cvslog
mailing list