mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-12 10:15:22 +00:00
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 d719981273
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavformat/4xm.c
This commit is contained in:
parent
aade60ab16
commit
7b9bcd993c
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user