[FFmpeg-cvslog] r16714 - in trunk/libavformat: isom.c isom.h mov.c
aurel
subversion
Wed Jan 21 23:32:18 CET 2009
Author: aurel
Date: Wed Jan 21 23:32:17 2009
New Revision: 16714
Log:
'code' is used to index a table so make it unsigned
this prevents using negative index and possibly crashing with broken files
Modified:
trunk/libavformat/isom.c
trunk/libavformat/isom.h
trunk/libavformat/mov.c
Modified: trunk/libavformat/isom.c
==============================================================================
--- trunk/libavformat/isom.c Wed Jan 21 18:34:40 2009 (r16713)
+++ trunk/libavformat/isom.c Wed Jan 21 23:32:17 2009 (r16714)
@@ -274,7 +274,7 @@ int ff_mov_iso639_to_lang(const char *la
return code;
}
-int ff_mov_lang_to_iso639(int code, char *to)
+int ff_mov_lang_to_iso639(unsigned code, char *to)
{
int i;
/* is it the mangled iso code? */
Modified: trunk/libavformat/isom.h
==============================================================================
--- trunk/libavformat/isom.h Wed Jan 21 18:34:40 2009 (r16713)
+++ trunk/libavformat/isom.h Wed Jan 21 23:32:17 2009 (r16714)
@@ -33,7 +33,7 @@ extern const AVCodecTag codec_movaudio_t
extern const AVCodecTag ff_codec_movsubtitle_tags[];
int ff_mov_iso639_to_lang(const char *lang, int mp4);
-int ff_mov_lang_to_iso639(int code, char *to);
+int ff_mov_lang_to_iso639(unsigned code, char *to);
typedef struct {
int count;
Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c Wed Jan 21 18:34:40 2009 (r16713)
+++ trunk/libavformat/mov.c Wed Jan 21 23:32:17 2009 (r16714)
@@ -494,7 +494,7 @@ static int mov_read_mdhd(MOVContext *c,
AVStream *st = c->fc->streams[c->fc->nb_streams-1];
MOVStreamContext *sc = st->priv_data;
int version = get_byte(pb);
- int lang;
+ unsigned lang;
if (version > 1)
return -1; /* unsupported */
More information about the ffmpeg-cvslog
mailing list