mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02: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>
This commit is contained in:
parent
5bcd3ae5b1
commit
d719981273
@ -131,6 +131,8 @@ static int parse_strk(AVFormatContext *s,
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
track = AV_RL32(buf + 8);
|
||||
if (track < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (track + 1 > fourxm->track_count) {
|
||||
if (av_reallocp_array(&fourxm->tracks, track + 1, sizeof(AudioTrack)))
|
||||
return AVERROR(ENOMEM);
|
||||
|
Loading…
Reference in New Issue
Block a user