This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 1088e8b43e7f367a7311b7a51410fcf149d6cda8 Author: Michael Niedermayer <[email protected]> AuthorDate: Tue Sep 15 06:02:19 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Sat Sep 26 15:05:54 2026 +0000 avformat/asfdec_f: index the seek position table by ASF stream number Fixes: stack buffer overflow Fixes: M3Ib1Zm6OX8V/testcase/crafted.asf / gen.py Fixes: M3Ib1Zm6OX8V Found-by: Zheng Yu @ Depthfirst --- libavformat/asfdec_f.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index a1a0428184..eb30283ce1 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -1451,9 +1451,9 @@ static int64_t asf_read_pts(AVFormatContext *s, int stream_index, int64_t pts; int64_t pos = *ppos; int i; - int64_t start_pos[ASF_MAX_STREAMS]; + int64_t start_pos[FF_ARRAY_ELEMS(asf->streams)]; - for (i = 0; i < s->nb_streams; i++) + for (i = 0; i < FF_ARRAY_ELEMS(start_pos); i++) start_pos[i] = pos; if (s->packet_size > 0) @@ -1475,17 +1475,17 @@ static int64_t asf_read_pts(AVFormatContext *s, int stream_index, pts = pkt->dts; if (pkt->flags & AV_PKT_FLAG_KEY) { - i = pkt->stream_index; + AVStream *st = s->streams[pkt->stream_index]; - asf_st = &asf->streams[s->streams[i]->id]; + asf_st = &asf->streams[st->id]; // assert((asf_st->packet_pos - s->data_offset) % s->packet_size == 0); pos = asf_st->packet_pos; av_assert1(pkt->pos == asf_st->packet_pos); - av_add_index_entry(s->streams[i], pos, pts, pkt->size, - pos - start_pos[i] + 1, AVINDEX_KEYFRAME); - start_pos[i] = asf_st->packet_pos + 1; + av_add_index_entry(st, pos, pts, pkt->size, + pos - start_pos[st->id] + 1, AVINDEX_KEYFRAME); + start_pos[st->id] = asf_st->packet_pos + 1; if (pkt->stream_index == stream_index) { av_packet_unref(pkt); -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
