mirror of
https://github.com/mpv-player/mpv
synced 2024-12-16 11:55:42 +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:
parent
baae5f1bdd
commit
49ddf2e0f5
@ -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) {
|
if (trak->stdata_len >= 36 + adjust) {
|
||||||
int atom_len = char2int(trak->stdata,28+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
|
switch(char2int(trak->stdata,32+adjust)) { // atom type
|
||||||
case MOV_FOURCC('e','s','d','s'): {
|
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);
|
mp_msg(MSGT_DEMUX, MSGL_V, "MOV: Found MPEG4 audio Elementary Stream Descriptor atom (%d)!\n", atom_len);
|
||||||
|
Loading…
Reference in New Issue
Block a user