diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-12-13 03:16:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-12-23 20:24:47 +0100 |
commit | 80cce5998c10ff5d93c7b52f303d83ad20fb3a11 (patch) | |
tree | f9c76f36ba13041a1a597800b15546207996ab91 /libavcodec | |
parent | fbf409cd91aca2b4738c6b5bc963ae6041f26701 (diff) | |
download | ffmpeg-80cce5998c10ff5d93c7b52f303d83ad20fb3a11.tar.gz |
avcodec/ivi: Avoid mbs memleak
Fixes: 11696/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO5_fuzzer-5740319635668992
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ivi.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/ivi.c b/libavcodec/ivi.c index b23d4af27e..71bf0e6e1c 100644 --- a/libavcodec/ivi.c +++ b/libavcodec/ivi.c @@ -437,6 +437,14 @@ av_cold int ff_ivi_init_tiles(IVIPlaneDesc *planes, for (b = 0; b < planes[p].num_bands; b++) { band = &planes[p].bands[b]; + + if (band->tiles) { + int t; + for (t = 0; t < band->num_tiles; t++) { + av_freep(&band->tiles[t].mbs); + } + } + x_tiles = IVI_NUM_TILES(band->width, t_width); y_tiles = IVI_NUM_TILES(band->height, t_height); band->num_tiles = x_tiles * y_tiles; |