From ad5807f8aa883bee5431186dc1f24c5435d722d3 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Tue, 13 Dec 2016 00:38:25 +0100 Subject: avformat: fix overflows during bit rate calculation The bit_rate field has type int64_t since commit 7404f3bdb90e6a5dcb59bc0a091e2c5c038e557d. Reviewed-by: Paul B Mahol Signed-off-by: Andreas Cadhalpun --- libavformat/wsddec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/wsddec.c') diff --git a/libavformat/wsddec.c b/libavformat/wsddec.c index 9ca0576..81a4dcc 100644 --- a/libavformat/wsddec.c +++ b/libavformat/wsddec.c @@ -128,7 +128,7 @@ static int wsd_read_header(AVFormatContext *s) st->codecpar->sample_rate = avio_rb32(pb) / 8; avio_skip(pb, 4); st->codecpar->channels = avio_r8(pb) & 0xF; - st->codecpar->bit_rate = st->codecpar->channels * st->codecpar->sample_rate * 8LL; + st->codecpar->bit_rate = (int64_t)st->codecpar->channels * st->codecpar->sample_rate * 8LL; if (!st->codecpar->channels) return AVERROR_INVALIDDATA; -- cgit v1.1