diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-08 05:43:14 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-11 20:42:04 +0400 |
commit | e5e422bcc3e6deee8c5c5bf8f5aeca2c051542f5 (patch) | |
tree | 66c1908507d69cc693cdd98b1a172dd3fa80b193 /libavformat/mxfdec.c | |
parent | 8d06be6b8ce7f411f0b1a614cad88a9719a21a5a (diff) |
mxfdec: Fix integer overflow with many channels
Fixes division by zero
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mxfdec.c')
-rw-r--r-- | libavformat/mxfdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index bb5f4a7808..648a579bef 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -2070,7 +2070,7 @@ static int mxf_set_audio_pts(MXFContext *mxf, AVCodecContext *codec, AVPacket *p pkt->pts = track->sample_count; if (codec->channels <= 0 || av_get_bits_per_sample(codec->codec_id) <= 0) return AVERROR(EINVAL); - track->sample_count += pkt->size / (codec->channels * av_get_bits_per_sample(codec->codec_id) / 8); + track->sample_count += pkt->size / (codec->channels * (int64_t)av_get_bits_per_sample(codec->codec_id) / 8); return 0; } |