From 42734c45785e0b3e816bb1a75cbb7ee9e78fefe3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 2 Jul 2019 19:57:08 +0200 Subject: [PATCH] avcodec/ivi: Ask for samples with odd tiles Fixes: Assertion failure Fixes: 15422/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO5_fuzzer-5676625481433088 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer (cherry picked from commit a7e02cf3ad6f6eaae07fa68ecb93014e1dfd224e) Signed-off-by: Michael Niedermayer --- libavcodec/ivi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/ivi.c b/libavcodec/ivi.c index d0e94c09d9..2a9da6411f 100644 --- a/libavcodec/ivi.c +++ b/libavcodec/ivi.c @@ -428,6 +428,10 @@ av_cold int ff_ivi_init_tiles(IVIPlaneDesc *planes, t_height = !p ? tile_height : (tile_height + 3) >> 2; if (!p && planes[0].num_bands == 4) { + if (t_width % 2 || t_height % 2) { + avpriv_request_sample(NULL, "Odd tiles"); + return AVERROR_PATCHWELCOME; + } t_width >>= 1; t_height >>= 1; }