mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 17:55:21 +00:00
avformat/spdifdec: Use 64bit to compute bit rate
Fixes: signed integer overflow: 32 * 553590816 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-6564974517944320
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 4075f0cec1
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a9eaeba875
commit
a411aba2c9
@ -226,7 +226,7 @@ int ff_spdif_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
if (!s->bit_rate && s->streams[0]->codecpar->sample_rate)
|
||||
/* stream bitrate matches 16-bit stereo PCM bitrate for currently
|
||||
supported codecs */
|
||||
s->bit_rate = 2 * 16 * s->streams[0]->codecpar->sample_rate;
|
||||
s->bit_rate = 2 * 16LL * s->streams[0]->codecpar->sample_rate;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user