comparison mov.c @ 4269:bbb6561a3974 libavformat

'code' is used to index a table so make it unsigned this prevents using negative index and possibly crashing with broken files
author aurel
date Wed, 21 Jan 2009 22:32:17 +0000
parents bf7a9658de71
children 571504a844b1
comparison
equal deleted inserted replaced
4268:85608ac6c804 4269:bbb6561a3974
492 static int mov_read_mdhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) 492 static int mov_read_mdhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
493 { 493 {
494 AVStream *st = c->fc->streams[c->fc->nb_streams-1]; 494 AVStream *st = c->fc->streams[c->fc->nb_streams-1];
495 MOVStreamContext *sc = st->priv_data; 495 MOVStreamContext *sc = st->priv_data;
496 int version = get_byte(pb); 496 int version = get_byte(pb);
497 int lang; 497 unsigned lang;
498 498
499 if (version > 1) 499 if (version > 1)
500 return -1; /* unsupported */ 500 return -1; /* unsupported */
501 501
502 get_be24(pb); /* flags */ 502 get_be24(pb); /* flags */