diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-09-17 21:54:31 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-11-03 23:29:50 +0100 |
commit | ad15735158c2f127a05ed4b8d9d1dbf785bd76fe (patch) | |
tree | 0755afbe8f195812521f30c17182401d4f7f0e6e | |
parent | 91376b3cc47295f40e3ee6e183df6a40a402f8d5 (diff) | |
download | ffmpeg-ad15735158c2f127a05ed4b8d9d1dbf785bd76fe.tar.gz |
avformat/dhav: Use 64bit seek_back
Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_DHAV_fuzzer-6604736532447232
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 10453f5192869b63b071aee3962ae2c712f9bfd3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/dhav.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/dhav.c b/libavformat/dhav.c index 6c1cdde32c..33b473d537 100644 --- a/libavformat/dhav.c +++ b/libavformat/dhav.c @@ -242,7 +242,7 @@ static int64_t get_duration(AVFormatContext *s) avio_seek(s->pb, avio_size(s->pb) - 8, SEEK_SET); while (avio_tell(s->pb) > 12 && max_interations--) { if (avio_rl32(s->pb) == MKTAG('d','h','a','v')) { - int seek_back = avio_rl32(s->pb); + int64_t seek_back = avio_rl32(s->pb); avio_seek(s->pb, -seek_back, SEEK_CUR); read_chunk(s); |