[FFmpeg-cvslog] 4xm: Check that the read track value is non-negative

Martin Storsjö git at videolan.org
Sat Sep 7 14:36:17 CEST 2013


ffmpeg | branch: release/1.1 | Martin Storsjö <martin at martin.st> | Tue Sep  3 13:53:23 2013 +0300| [7b9bcd993c10144f65b62364ab1fd11be51bde9b] | committer: Luca Barbato

4xm: Check that the read track value is non-negative

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit d719981273bc779c7d1e879d88404fd867f93a0e)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

Conflicts:
	libavformat/4xm.c

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

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

diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 5fb1921..9dfb956 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -136,6 +136,8 @@ static int parse_strk(AVFormatContext *s,
         av_log(s, AV_LOG_ERROR, "current_track too large\n");
         return AVERROR_INVALIDDATA;
     }
+    if (track < 0)
+        return AVERROR_INVALIDDATA;
     if (track + 1 > fourxm->track_count) {
         AudioTrack *tmp = av_realloc(fourxm->tracks,
                                      (track + 1) * sizeof(AudioTrack));



More information about the ffmpeg-cvslog mailing list