diff options
author | Andreas Cadhalpun <[email protected]> | 2015-04-22 17:08:51 +0200 |
---|---|---|
committer | Andreas Cadhalpun <[email protected]> | 2015-05-14 19:07:01 +0200 |
commit | 787e094ed0b04bfd5f32ccfe0b6c2fc8e89dace4 (patch) | |
tree | 705979f57a2e8a854fde8c0accd8f554bb4c138e | |
parent | 2f8f4351b857983599da115e0a14dd1861852466 (diff) |
bink: check vst->index_entries before using it
This fixes a NULL pointer dereference if vst->duration is 0.
The problem was introduced in commit 0588acaf.
Signed-off-by: Andreas Cadhalpun <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 86d00ede4f9acb02690a0615490173648e1d933c)
Signed-off-by: Andreas Cadhalpun <[email protected]>
-rw-r--r-- | libavformat/bink.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/bink.c b/libavformat/bink.c index 92ce26198d..332edbb7d9 100644 --- a/libavformat/bink.c +++ b/libavformat/bink.c @@ -194,7 +194,10 @@ static int read_header(AVFormatContext *s) return ret; } - avio_seek(pb, vst->index_entries[0].pos, SEEK_SET); + if (vst->index_entries) + avio_seek(pb, vst->index_entries[0].pos, SEEK_SET); + else + avio_skip(pb, 4); bink->current_track = -1; return 0; |