mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
Add missing range/length check for video trak desc (fixes bug #335).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15950 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e795c4b11b
commit
628236e0c0
@ -801,9 +801,16 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
|
||||
int hdr_ptr = 76; // the byte just after depth
|
||||
unsigned char *palette_map;
|
||||
sh_video_t* sh=new_sh_video(demuxer,priv->track_db);
|
||||
int depth = trak->stdata[75]|(trak->stdata[74]<<8);
|
||||
int depth;
|
||||
sh->format=trak->fourcc;
|
||||
|
||||
if (trak->stdata_len < 78) {
|
||||
mp_msg(MSGT_DEMUXER, MSGL_WARN,
|
||||
"MOV: Invalid (%d bytes instead of >= 78) video trak desc\n",
|
||||
trak->stdata_len);
|
||||
break;
|
||||
}
|
||||
depth = trak->stdata[75] | (trak->stdata[74] << 8);
|
||||
// stdata[]:
|
||||
// 8 short version
|
||||
// 10 short revision
|
||||
|
Loading…
Reference in New Issue
Block a user