# HG changeset patch # User reimar # Date 1215813781 0 # Node ID 8c5ec96a0bc7d9062c6fe91d7313c5d7c8d428ba # Parent 606f30477d1852815610b2256b5a741cce053fb8 Check size of tkdata before using it in mov demuxer. Fixes bug #1170 and others. diff -r 606f30477d18 -r 8c5ec96a0bc7 libmpdemux/demux_mov.c --- a/libmpdemux/demux_mov.c Fri Jul 11 21:59:17 2008 +0000 +++ b/libmpdemux/demux_mov.c Fri Jul 11 22:03:01 2008 +0000 @@ -1114,6 +1114,7 @@ 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 @@ 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);