summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_mov.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-07-05 02:55:56 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-07-05 02:55:56 +0300
commit8ea134bd23022afbe1a06c0241c0c2c6ea2618f8 (patch)
tree9e9fcbd8af8e82dd189beebc7bd4ed1e52b1fd87 /libmpdemux/demux_mov.c
parent7de350c673e1c0ae52d655e322a072f2f6b624b0 (diff)
parent6d14167f28b453a4410701cfeb87f7d9c18f869a (diff)
downloadmpv-8ea134bd23022afbe1a06c0241c0c2c6ea2618f8.tar.bz2
mpv-8ea134bd23022afbe1a06c0241c0c2c6ea2618f8.tar.xz
Merge svn changes up to r27202
Diffstat (limited to 'libmpdemux/demux_mov.c')
-rw-r--r--libmpdemux/demux_mov.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libmpdemux/demux_mov.c b/libmpdemux/demux_mov.c
index 37de8b9558..be23ba479c 100644
--- a/libmpdemux/demux_mov.c
+++ b/libmpdemux/demux_mov.c
@@ -657,6 +657,10 @@ static int gen_sh_audio(sh_audio_t* sh, mov_track_t* trak, int timescale) {
// 36 char[] atom data (len=size-8)
// TODO: fix parsing for files using version 2.
+ if (trak->stdata_len < 26) {
+ mp_msg(MSGT_DEMUX, MSGL_WARN, "MOV: broken (too small) sound atom!\n");
+ return 0;
+ }
version=char2short(trak->stdata,8);
if (version > 1)
mp_msg(MSGT_DEMUX, MSGL_WARN, "MOV: version %d sound atom may not parse correctly!\n", version);