avcodec/nuv: add FF_CODEC_CAP_INIT_CLEANUP
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 11 Jan 2019 01:15:08 +0000 (02:15 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 12 Jan 2019 01:06:09 +0000 (02:06 +0100)
Fixes: memleak
Fixes: 12244/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NUV_fuzzer-5099447273390080

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/nuv.c

index 32ed658..75b14bc 100644 (file)
@@ -365,4 +365,5 @@ AVCodec ff_nuv_decoder = {
     .close          = decode_end,
     .decode         = decode_frame,
     .capabilities   = AV_CODEC_CAP_DR1,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };