[FFmpeg-cvslog] avformat/concatdec: Use FAIL() macro instead of direct return in concat_parse_script()

Michael Niedermayer git at videolan.org
Wed Sep 22 19:57:29 EEST 2021


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Wed Sep 22 00:01:00 2021 +0200| [0b761e87c044fe46746eb5849991d0deea40778e] | committer: Michael Niedermayer

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 <george at nsup.org>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b761e87c044fe46746eb5849991d0deea40778e
---

 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:



More information about the ffmpeg-cvslog mailing list