diff mbox

[FFmpeg-devel,1/3] avcodec/ivi: Ask for samples with odd tiles

Message ID 20190702195906.7938-1-michael@niedermayer.cc
State Accepted
Commit a7e02cf3ad6f6eaae07fa68ecb93014e1dfd224e
Headers show

Commit Message

Michael Niedermayer July 2, 2019, 7:59 p.m. UTC
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 <michael@niedermayer.cc>
---
 libavcodec/ivi.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Michael Niedermayer July 17, 2019, 8:41 p.m. UTC | #1
On Tue, Jul 02, 2019 at 09:59:04PM +0200, Michael Niedermayer wrote:
> 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 <michael@niedermayer.cc>
> ---
>  libavcodec/ivi.c | 4 ++++
>  1 file changed, 4 insertions(+)

will apply patchset

[...]
diff mbox

Patch

diff --git a/libavcodec/ivi.c b/libavcodec/ivi.c
index e9c4b9b831..73fcf51b7b 100644
--- a/libavcodec/ivi.c
+++ b/libavcodec/ivi.c
@@ -429,6 +429,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;
         }