avcodec/mpegaudio_parser: Initialize poutbuf*
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 5 Aug 2018 12:51:36 +0000 (14:51 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 12 Aug 2018 19:51:39 +0000 (21:51 +0200)
Possibly fixes: null pointer dereference
Possibly fixes: 9352/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MP3ADUFLOAT_fuzzer-5146068961460224
Fixes: Heap-use-after-free
Fixes: 9453/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MP3ADUFLOAT_fuzzer-5137954375729152

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mpegaudio_parser.c

index 244281b..a109f12 100644 (file)
@@ -99,6 +99,8 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
                     } else if (codec_id == AV_CODEC_ID_MP3ADU) {
                         avpriv_report_missing_feature(avctx,
                             "MP3ADU full parser");
+                        *poutbuf = NULL;
+                        *poutbuf_size = 0;
                         return 0; /* parsers must not return error codes */
                     }