Message ID | 20211207081411.16442-2-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | dd949124793c722ed55dead9da245574ace81968 |
Headers | show |
Series | [FFmpeg-devel,1/4] avformat/4xm: Consider max_streams on reallocating tracks array | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
diff --git a/libavformat/4xm.c b/libavformat/4xm.c index 848991af5b8..e3075600142 100644 --- a/libavformat/4xm.c +++ b/libavformat/4xm.c @@ -149,6 +149,9 @@ static int parse_strk(AVFormatContext *s, memset(&fourxm->tracks[fourxm->track_count], 0, sizeof(AudioTrack) * (track + 1 - fourxm->track_count)); fourxm->track_count = track + 1; + } else { + if (fourxm->tracks[track].bits) + return AVERROR_INVALIDDATA; } fourxm->tracks[track].adpcm = AV_RL32(buf + 12); fourxm->tracks[track].channels = AV_RL32(buf + 36);
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavformat/4xm.c | 3 +++ 1 file changed, 3 insertions(+)