1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-16 03:45:23 +00:00

Add atom_len sanity check to mov demuxer.

Fixes bug #1168


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27264 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2008-07-11 21:59:17 +00:00
parent baae5f1bdd
commit 49ddf2e0f5

View File

@ -772,6 +772,7 @@ static int gen_sh_audio(sh_audio_t* sh, mov_track_t* trak, int timescale) {
}
if (trak->stdata_len >= 36 + adjust) {
int atom_len = char2int(trak->stdata,28+adjust);
if (atom_len < 0 || atom_len > trak->stdata_len - 28 - adjust) atom_len = trak->stdata_len - 28 - adjust;
switch(char2int(trak->stdata,32+adjust)) { // atom type
case MOV_FOURCC('e','s','d','s'): {
mp_msg(MSGT_DEMUX, MSGL_V, "MOV: Found MPEG4 audio Elementary Stream Descriptor atom (%d)!\n", atom_len);