aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/twinvq.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-16 22:41:41 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-16 22:44:32 +0100
commit93e3ec451caf12ebb22fbf3ecdb7bba41f7835c6 (patch)
tree59f9dbe216cc6860b8556a3a6b615a131d1e44e7 /libavcodec/twinvq.c
parent76c48a78d1c0842d26b8ae926af3610935b0f280 (diff)
parent9925f7df0a50387ade8d83cb85b40c53e41e7041 (diff)
downloadffmpeg-93e3ec451caf12ebb22fbf3ecdb7bba41f7835c6.tar.gz
Merge commit '9925f7df0a50387ade8d83cb85b40c53e41e7041' into release/0.10
* commit '9925f7df0a50387ade8d83cb85b40c53e41e7041': vc1dec: Make sure last_picture is initialized in vc1_decode_skip_blocks r3d: Add more input value validation fraps: Make the input buffer size checks more strict svq3: Avoid a division by zero rmdec: Validate the fps value twinvqdec: Check the ibps parameter separately asfdec: Check the return value of asf_read_stream_properties mxfdec: set audio timebase to 1/samplerate pcx: Check the packet size before assuming it fits a palette rpza: Fix a buffer size check xxan: Disallow odd width xan: Only read within the data that actually was initialized Conflicts: libavcodec/fraps.c libavformat/mxfdec.c tests/ref/seek/lavf_mxf tests/ref/seek/lavf_mxf_d10 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/twinvq.c')
-rw-r--r--libavcodec/twinvq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
index 6a0bd4d145..6c958d9df1 100644
--- a/libavcodec/twinvq.c
+++ b/libavcodec/twinvq.c
@@ -1137,6 +1137,10 @@ static av_cold int twin_decode_init(AVCodecContext *avctx)
return -1;
}
ibps = avctx->bit_rate / (1000 * avctx->channels);
+ if (ibps < 8 || ibps > 48) {
+ av_log(avctx, AV_LOG_ERROR, "Bad bitrate per channel value %d\n", ibps);
+ return AVERROR_INVALIDDATA;
+ }
switch ((isampf << 8) + ibps) {
case (8 <<8) + 8: tctx->mtab = &mode_08_08; break;