This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/9.1 in repository ffmpeg.
commit e0285c017047a60aa23dabefa9a76d1ab283355e Author: Richard Desmarais <[email protected]> AuthorDate: Thu Nov 12 10:05:56 2026 -0500 Commit: Michael Niedermayer <[email protected]> CommitDate: Thu Nov 19 14:56:30 2026 +0100 avformat/bink: do not dereference the index in read_seek() when it is empty read_header() adds one index entry per frame, bounded by the frame count from the header, and guards the zero-frames case before touching index_entries[0] (bink.c:227). read_seek() has no such guard and dereferences index_entries[0] unconditionally, so any seek into a Bink file that declares zero frames (which opens fine) crashes with SIGSEGV: ret = avio_seek(s->pb, vsti->index_entries[0].pos + bink->smush_size, SEEK_SET); Reproduce with a 48-byte sample (BIK header, zero frames): ffmpeg -ss 1 -f bink -i poc.bik -f null - before: "SEGV on unknown address 0x000000000000" (ASAN), the demuxer keeps a NULL index when nb_frames == 0; after: "no index entries", AVERROR(EINVAL). Signed-off-by: Richard Desmarais <[email protected]> (cherry picked from commit 507f6dd6f775736a12a47bb87900954b0dffc2c7) Signed-off-by: Michael Niedermayer <[email protected]> --- libavformat/bink.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/bink.c b/libavformat/bink.c index 6becc59031..ce03adcf87 100644 --- a/libavformat/bink.c +++ b/libavformat/bink.c @@ -313,6 +313,10 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, in if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL)) return -1; + /* read_header() builds no index when the frame count is zero */ + if (!vsti->index_entries) + return AVERROR(EINVAL); + /* seek to the first frame */ ret = avio_seek(s->pb, vsti->index_entries[0].pos + bink->smush_size, SEEK_SET); if (ret < 0) -- 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]
