[FFmpeg-cvslog] avformat/4xm: Check for duplicate track ids

Michael Niedermayer git at videolan.org
Sat Apr 23 18:45:00 EEST 2022


ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Tue Dec  7 09:14:09 2021 +0100| [9b5d10d744d7f50b04fa14d44fc1720eb5a2b2b9] | committer: Michael Niedermayer

avformat/4xm: Check for duplicate track ids

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit dd949124793c722ed55dead9da245574ace81968)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 7690e26630..e814eac660 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -148,6 +148,9 @@ static int parse_strk(AVFormatContext *s,
         memset(&fourxm->tracks[fourxm->track_count], 0,
                sizeof(AudioTrack) * (track + 1 - fourxm->track_count));
         fourxm->track_count = track + 1;
+    } else {
+        if (fourxm->tracks[track].bits)
+            return AVERROR_INVALIDDATA;
     }
     fourxm->tracks[track].adpcm       = AV_RL32(buf + 12);
     fourxm->tracks[track].channels    = AV_RL32(buf + 36);



More information about the ffmpeg-cvslog mailing list