From 0b761e87c044fe46746eb5849991d0deea40778e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 22 Sep 2021 00:01:00 +0200 Subject: [PATCH] avformat/concatdec: Use FAIL() macro instead of direct return in concat_parse_script() Fixes: memleak Fixes: 38893/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-4785231933079552 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Nicolas George Signed-off-by: Michael Niedermayer --- libavformat/concatdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index 0886dad88b..2557f38b26 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -627,7 +627,7 @@ static int concat_parse_script(AVFormatContext *avf) chapter = avpriv_new_chapter(avf, arg_int[0], AV_TIME_BASE_Q, arg_int[1], arg_int[2], NULL); if (!chapter) - return AVERROR(ENOMEM); + FAIL(ENOMEM); break; default: