Re: [FFmpeg-devel] [PATCH 1/4] avcodec/tiff: Check for 12bit gray fax

2019-01-20 Thread Michael Niedermayer
On Sat, Jan 12, 2019 at 11:28:00PM +0100, Michael Niedermayer wrote:
> 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 
> ---
>  libavcodec/tiff.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply patchset


[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/4] avcodec/tiff: Check for 12bit gray fax

2019-01-12 Thread Michael Niedermayer
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 
---
 libavcodec/tiff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 570b3cbd01..5cf2a4417e 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);
-- 
2.20.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel