summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-07-11 22:03:01 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-07-11 22:03:01 +0000
commitd8b29c80d5ab6f0a7d406df58c99a707132e6b8a (patch)
treea24ac0abf3c3323818498f4ac5886c6dbcf503a5
parent49ddf2e0f5aa869a2fb3fbcf28c9b4dcc65fd2cc (diff)
downloadmpv-d8b29c80d5ab6f0a7d406df58c99a707132e6b8a.tar.bz2
mpv-d8b29c80d5ab6f0a7d406df58c99a707132e6b8a.tar.xz
Check size of tkdata before using it in mov demuxer.
Fixes bug #1170 and others. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27265 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libmpdemux/demux_mov.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libmpdemux/demux_mov.c b/libmpdemux/demux_mov.c
index 4a3f3c8528..b244a3e402 100644
--- a/libmpdemux/demux_mov.c
+++ b/libmpdemux/demux_mov.c
@@ -1114,6 +1114,7 @@ static int gen_sh_video(sh_video_t* sh, mov_track_t* trak, int timescale) {
sh->disp_w=trak->stdata[25]|(trak->stdata[24]<<8);
sh->disp_h=trak->stdata[27]|(trak->stdata[26]<<8);
+ if(trak->tkdata_len>81) {
// if image size is zero, fallback to display size
if(!sh->disp_w && !sh->disp_h) {
sh->disp_w=trak->tkdata[77]|(trak->tkdata[76]<<8);
@@ -1123,6 +1124,7 @@ static int gen_sh_video(sh_video_t* sh, mov_track_t* trak, int timescale) {
sh->aspect=trak->tkdata[77]|(trak->tkdata[76]<<8);
sh->aspect/=trak->tkdata[81]|(trak->tkdata[80]<<8);
}
+ }
if(depth>32+8) mp_msg(MSGT_DEMUX, MSGL_INFO,"*** depth = 0x%X\n",depth);