Mercurial > mplayer.hg
changeset 15783:dd5d3924a1ab
avoid bad memory access
author | reimar |
---|---|
date | Mon, 20 Jun 2005 14:32:51 +0000 |
parents | acd282acf129 |
children | 29c784e5b40b |
files | libmpdemux/demux_mov.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_mov.c Mon Jun 20 14:30:02 2005 +0000 +++ b/libmpdemux/demux_mov.c Mon Jun 20 14:32:51 2005 +0000 @@ -996,7 +996,9 @@ } } - if((trak->stdata[9]==0 || trak->stdata[9]==1) && trak->stdata_len >= 36) { // version 0 with extra atoms + if ((trak->stdata[9] == 0 && trak->stdata_len >= 36) || + (trak->stdata[9] == 1 && trak->stdata_len >= 36 + 48)) { + // version 0 with extra atoms int adjust = (trak->stdata[9]==1)?48:0; int atom_len = char2int(trak->stdata,28+adjust); switch(char2int(trak->stdata,32+adjust)) { // atom type