mirror of
https://github.com/mpv-player/mpv
synced 2025-01-04 05:52:09 +00:00
Check stdata_len before accessing stdata. Fixes bug #1125
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27194 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3a9b304974
commit
869e44fdcc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user