diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-09-18 18:12:11 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-10-09 21:33:11 +0200 |
commit | 674f7c87c90da33b49ac6cd594cdefc453d65ce1 (patch) | |
tree | 14f8d170ca520abe8f4439a9e772f90d8602c469 | |
parent | 619612ac014e6ee2c3dc708760ba056ac563db56 (diff) | |
download | ffmpeg-674f7c87c90da33b49ac6cd594cdefc453d65ce1.tar.gz |
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 4075f0cec1830a7ac081b1a23bd3f5c4e266fe26)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/spdifdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/spdifdec.c b/libavformat/spdifdec.c index d74f58d82b..8c1a7c87e6 100644 --- a/libavformat/spdifdec.c +++ b/libavformat/spdifdec.c @@ -229,7 +229,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; } |