Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Cadhalpun <andreas.cadhalpun@googlemail.com>2015-04-22 18:08:51 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-04-22 21:22:19 +0300
commit86d00ede4f9acb02690a0615490173648e1d933c (patch)
tree602a34e20e957d6f7fbee214c8fabede8fb5f4b1 /libavformat/bink.c
parent4d98015dcf6562b5822a96f024ac8c94b95203a6 (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 <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/bink.c')
-rw-r--r--libavformat/bink.c5
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;