diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-12-19 08:43:10 -0500 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-01-03 16:28:17 -0500 |
commit | 6fd075f1806e375f66ce436cca15e085f0088118 (patch) | |
tree | fc01e9a66901ebaa164b1f077e1a26daffcce355 /libavcodec/adx.c | |
parent | 4f1a787744ee79137f224c08b9283d028a272d60 (diff) | |
download | ffmpeg-6fd075f1806e375f66ce436cca15e085f0088118.tar.gz |
adxdec: Validate channel count to fix a division by zero.
Diffstat (limited to 'libavcodec/adx.c')
-rw-r--r-- | libavcodec/adx.c | 2 |
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 */ |