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>2021-04-15 23:44:19 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-06 13:06:15 +0300
commita214f6e238b96b054e8cee342d77912e50681f67 (patch)
tree79dd94bebee9db7c0d141aa4b6c327b5147f4dcf /libavformat
parentecb7f15b7bd2bc4902a9ca98084624472aedbd1d (diff)
avformat/rmdec: Use 64bit for intermediate for DEINT_ID_INT4
Fixes: runtime error: signed integer overflow: 65312 * 65535 cannot be represented in type 'int' Fixes: 32832/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-4817710040088576 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 e2c2872393f25253aa40861a9707934c4b83a3af) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rmdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 8c91989505..8f31c4717c 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -268,9 +268,9 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
case DEINT_ID_INT4:
if (ast->coded_framesize > ast->audio_framesize ||
sub_packet_h <= 1 ||
- ast->coded_framesize * sub_packet_h > (2 + (sub_packet_h & 1)) * ast->audio_framesize)
+ ast->coded_framesize * (uint64_t)sub_packet_h > (2 + (sub_packet_h & 1)) * ast->audio_framesize)
return AVERROR_INVALIDDATA;
- if (ast->coded_framesize * sub_packet_h != 2*ast->audio_framesize) {
+ if (ast->coded_framesize * (uint64_t)sub_packet_h != 2*ast->audio_framesize) {
avpriv_request_sample(s, "mismatching interleaver parameters");
return AVERROR_INVALIDDATA;
}