ffmpeg | branch: release/4.2 | Michael Niedermayer <[email protected]> | 
Wed Aug 21 20:37:17 2019 +0200| [818a3fd27c621cb6397d58183f0658a2495f6cde] | 
committer: Michael Niedermayer

avformat/realtextdec: free queue on error

Fixes: memleak
Fixes: 
16277/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5696629440512000

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 493438fafc5c43b7b7c62bf0c21b7cc884034ce9)
Signed-off-by: Michael Niedermayer <[email protected]>

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

 libavformat/realtextdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/realtextdec.c b/libavformat/realtextdec.c
index 204e557aa2..c2316da0ed 100644
--- a/libavformat/realtextdec.c
+++ b/libavformat/realtextdec.c
@@ -123,6 +123,8 @@ static int realtext_read_header(AVFormatContext *s)
 
 end:
     av_bprint_finalize(&buf, NULL);
+    if (res < 0)
+        ff_subtitles_queue_clean(&rt->q);
     return res;
 }
 

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to