diff options
Diffstat (limited to '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 462917893e..39e1e87061 100644 --- a/libavformat/4xm.c +++ b/libavformat/4xm.c @@ -185,6 +185,8 @@ static int fourxm_read_header(AVFormatContext *s, current_track = LE_32(&header[i + 8]); if (current_track + 1 > fourxm->track_count) { fourxm->track_count = current_track + 1; + if((unsigned)fourxm->track_count >= UINT_MAX / sizeof(AudioTrack)) + return -1; fourxm->tracks = av_realloc(fourxm->tracks, fourxm->track_count * sizeof(AudioTrack)); if (!fourxm->tracks) { |