Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-03-26 00:47:26 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-06-14 17:46:28 +0300
commit9274fb25324cc7676d3464b5248739166926c6a7 (patch)
tree854ce3c0addb68ebfc63287e9eedbfd784af3883 /libavformat/mov.c
parent9874baf2cd31c83cc32e213e5f1b6ad7bf5b4086 (diff)
avformat/mov: Non overflowing ambisonic order check
Fixes: signed integer overflow: 536870913 * 536870913 cannot be represented in type 'int' Fixes: 45862/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4730373768085504 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/mov.c')
-rw-r--r--libavformat/mov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index f8248ab65b..3ec0ea2361 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -7381,7 +7381,7 @@ static int mov_read_SA3D(MOVContext *c, AVIOContext *pb, MOVAtom atom)
}
channel_count = avio_rb32(pb);
- if (channel_count != (ambisonic_order + 1) * (ambisonic_order + 1)) {
+ if (ambisonic_order < 0 || channel_count != (ambisonic_order + 1LL) * (ambisonic_order + 1LL)) {
av_log(c->fc, AV_LOG_ERROR,
"Invalid number of channels (%d / %d)\n",
channel_count, ambisonic_order);