diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-18 20:10:51 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-18 20:49:34 +0100 |
commit | 6b6b84ae1625ce1e38ff5f1b4c0bf03450066e66 (patch) | |
tree | 78810e36e0fa8d98ac8283834915fd78833309b3 /libavcodec | |
parent | bdd62a615a74ba7d29b528263462937da132c62c (diff) | |
download | ffmpeg-6b6b84ae1625ce1e38ff5f1b4c0bf03450066e66.tar.gz |
adxdec: Fix division by zero
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/adxdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/adxdec.c b/libavcodec/adxdec.c index 20f2606a90..cf494c12d4 100644 --- a/libavcodec/adxdec.c +++ b/libavcodec/adxdec.c @@ -120,6 +120,8 @@ static int adx_decode_frame(AVCodecContext *avctx, void *data, buf += header_size; buf_size -= header_size; } + if(c->channels <= 0) + return AVERROR_INVALIDDATA; /* calculate number of blocks in the packet */ num_blocks = buf_size / (BLOCK_SIZE * c->channels); |