Mercurial > mplayer.hg
changeset 25892:68a400e63e67
Make sure chunkmap values are within bounds when using them.
author | reimar |
---|---|
date | Tue, 29 Jan 2008 22:13:47 +0000 |
parents | d17a6a6d346a |
children | 638493dc056e |
files | libmpdemux/demux_mov.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_mov.c Tue Jan 29 22:13:20 2008 +0000 +++ b/libmpdemux/demux_mov.c Tue Jan 29 22:13:47 2008 +0000 @@ -175,11 +175,12 @@ i=trak->chunkmap_size; while(i>0){ --i; - for(j=trak->chunkmap[i].first;j<last;j++){ + j=FFMAX(trak->chunkmap[i].first, 0); + for(;j<last;j++){ trak->chunks[j].desc=trak->chunkmap[i].sdid; trak->chunks[j].size=trak->chunkmap[i].spc; } - last=trak->chunkmap[i].first; + last=FFMIN(trak->chunkmap[i].first, trak->chunks_size); } #if 0