]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/wmalosslessdec: Set FF_CODEC_CAP_INIT_CLEANUP
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 30 Oct 2019 22:31:51 +0000 (23:31 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 10 Dec 2019 15:09:14 +0000 (16:09 +0100)
Fixes: memleaks
Fixes: 18429/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-6210814364614656
Fixes: 18722/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5680535690543104
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/wmalosslessdec.c

index d4f18b9841139465a6f9856f5e168e325f3adc0a..7ed6ce3135c5a8b40d1506e96fd2c38867c6d88a 100644 (file)
@@ -1327,6 +1327,7 @@ AVCodec ff_wmalossless_decoder = {
     .decode         = decode_packet,
     .flush          = flush,
     .capabilities   = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
     .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
                                                       AV_SAMPLE_FMT_S32P,
                                                       AV_SAMPLE_FMT_NONE },