[FFmpeg-cvslog] avformat/avidec: Ignore duplicate GAB2

Michael Niedermayer git at videolan.org
Thu May 15 05:40:36 EEST 2025


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat May 10 01:55:27 2025 +0200| [6a47046981d05c59f6ac766d5fbf6586261a216f] | committer: Michael Niedermayer

avformat/avidec: Ignore duplicate GAB2

Fixes: memleak
Fixes: 398401912/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-4669849976766464

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

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

 libavformat/avidec.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 1ae09efc15..81a0ae31ba 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -1122,6 +1122,10 @@ static int read_gab2_sub(AVFormatContext *s, AVStream *st, AVPacket *pkt)
         int size;
         AVProbeData pd;
         unsigned int desc_len;
+
+        if (ast->sub_ctx)
+            return 0;
+
         AVIOContext *pb = avio_alloc_context(pkt->data + 7,
                                              pkt->size - 7,
                                              0, NULL, NULL, NULL, NULL);



More information about the ffmpeg-cvslog mailing list