mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
2768928624
commit
e2c2872393
@ -267,9 +267,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user