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-09-18 19:12:11 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-09-24 19:29:32 +0300
commit4075f0cec1830a7ac081b1a23bd3f5c4e266fe26 (patch)
tree103175f5323c6311d2997c56d46679110d6b11dd /libavformat
parent529f64b2eb98e0c3ae4944abd5d01fa7c1def047 (diff)
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>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/spdifdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/spdifdec.c b/libavformat/spdifdec.c
index 2af75ca9db..672133581a 100644
--- a/libavformat/spdifdec.c
+++ b/libavformat/spdifdec.c
@@ -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;
}