[FFmpeg-devel] [PATCH 2/7] 4xm: prevent overflow during block alignment calculation
Andreas Cadhalpun
andreas.cadhalpun at googlemail.com
Fri Dec 16 04:32:42 EET 2016
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
---
libavformat/4xm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 2758b69..9332f78 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -187,6 +187,7 @@ static int parse_strk(AVFormatContext *s,
st->codecpar->bit_rate = (int64_t)st->codecpar->channels *
st->codecpar->sample_rate *
st->codecpar->bits_per_coded_sample;
+ FF_BAIL_ON_OVERFLOW(s, st->codecpar->channels && st->codecpar->bits_per_coded_sample > INT_MAX / st->codecpar->channels)
st->codecpar->block_align = st->codecpar->channels *
st->codecpar->bits_per_coded_sample;
--
2.10.2
More information about the ffmpeg-devel
mailing list