[FFmpeg-cvslog] avcodec/utils: fix leak of subtitle_header on error path
Michael Niedermayer
git at videolan.org
Sun Aug 4 22:18:43 EEST 2019
ffmpeg | branch: release/4.2 | Michael Niedermayer <michael at niedermayer.cc> | Thu Jul 4 23:39:23 2019 +0200| [9cb0da0bfef9d751b5f72779d7f20dab6dd98b86] | committer: Michael Niedermayer
avcodec/utils: fix leak of subtitle_header on error path
Fixes: memleak
Fixes: 15528/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_STL_fuzzer-5735993371525120
Fixes: 15792/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SAMI_fuzzer-5737754232619008
Fixes: 16008/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SSA_fuzzer-5650582821404672
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 923d5c489fd4ffd0b9dbfdc6c14f594bd134ab47)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9cb0da0bfef9d751b5f72779d7f20dab6dd98b86
---
libavcodec/utils.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 66c68d1cf5..a6a646636d 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1041,6 +1041,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
av_dict_free(&tmp);
av_freep(&avctx->priv_data);
+ av_freep(&avctx->subtitle_header);
if (avctx->internal) {
av_frame_free(&avctx->internal->to_free);
av_frame_free(&avctx->internal->compat_decode_frame);
More information about the ffmpeg-cvslog
mailing list