Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-12-19 17:43:10 +0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-01-04 01:28:17 +0400
commit6fd075f1806e375f66ce436cca15e085f0088118 (patch)
treefc01e9a66901ebaa164b1f077e1a26daffcce355 /libavcodec/adx.c
parent4f1a787744ee79137f224c08b9283d028a272d60 (diff)
adxdec: Validate channel count to fix a division by zero.
Diffstat (limited to 'libavcodec/adx.c')
-rw-r--r--libavcodec/adx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adx.c b/libavcodec/adx.c
index aa90fd89c3..1e5d89c991 100644
--- a/libavcodec/adx.c
+++ b/libavcodec/adx.c
@@ -58,7 +58,7 @@ int avpriv_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf,
/* channels */
avctx->channels = buf[7];
- if (avctx->channels > 2)
+ if (avctx->channels <= 0 || avctx->channels > 2)
return AVERROR_INVALIDDATA;
/* sample rate */