diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-05-11 18:54:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-08-28 20:47:24 +0200 |
commit | a4c98c507ed3c729fc92d641b974385f8aa37b33 (patch) | |
tree | 8d7c31b111c17b9bb46e94c1a04cd19d57bc0d4f /libavformat | |
parent | 104a8399ae96f022a3662bd67668ad07e53e3093 (diff) | |
download | ffmpeg-a4c98c507ed3c729fc92d641b974385f8aa37b33.tar.gz |
avformat/avidec: Use 64bit for frame number in odml index parsing
Fixes: signed integer overflow: 1179337772 + 1392508928 cannot be represented in type 'int'
Fixes: 34088/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-5846945303232512
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avidec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 5d695b9839..b1dea1362e 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -164,7 +164,7 @@ static int get_riff(AVFormatContext *s, AVIOContext *pb) return 0; } -static int read_odml_index(AVFormatContext *s, int frame_num) +static int read_odml_index(AVFormatContext *s, int64_t frame_num) { AVIContext *avi = s->priv_data; AVIOContext *pb = s->pb; @@ -184,7 +184,7 @@ static int read_odml_index(AVFormatContext *s, int frame_num) av_log(s, AV_LOG_TRACE, "longs_per_entry:%d index_type:%d entries_in_use:%d " - "chunk_id:%X base:%16"PRIX64" frame_num:%d\n", + "chunk_id:%X base:%16"PRIX64" frame_num:%"PRId64"\n", longs_per_entry, index_type, entries_in_use, |