mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
oavformat/avidec: Check offset in odml
Fixes: signed integer overflow: 9223372036854775807 + 8 cannot be represented in type 'long' Fixes: 38787/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-4859845799444480 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 255a7b423ed5e07536bdc72e993056daa4efe009) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
e926d0082a
commit
c641782f7a
@ -240,7 +240,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num)
|
|||||||
avio_rl32(pb); /* size */
|
avio_rl32(pb); /* size */
|
||||||
duration = avio_rl32(pb);
|
duration = avio_rl32(pb);
|
||||||
|
|
||||||
if (avio_feof(pb))
|
if (avio_feof(pb) || offset > INT64_MAX - 8)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
pos = avio_tell(pb);
|
pos = avio_tell(pb);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user