diff options
author | Martin Storsjö <martin@martin.st> | 2013-09-03 13:53:23 +0300 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-09-07 10:25:48 +0200 |
commit | 7b9bcd993c10144f65b62364ab1fd11be51bde9b (patch) | |
tree | 39542d88a233c63c3b418424fd5761e327017252 | |
parent | aade60ab165716523788cd11caf03ae61b40144a (diff) | |
download | ffmpeg-7b9bcd993c10144f65b62364ab1fd11be51bde9b.tar.gz |
4xm: Check that the read track value is non-negative
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit d719981273bc779c7d1e879d88404fd867f93a0e)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavformat/4xm.c
-rw-r--r-- | libavformat/4xm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/4xm.c b/libavformat/4xm.c index 5fb1921dd9..9dfb95650f 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)); |