[FFmpeg-cvslog] adxdec: Validate channel count to fix a division by zero.
Justin Ruggles
git at videolan.org
Wed Jan 4 01:39:34 CET 2012
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Mon Dec 19 08:43:10 2011 -0500| [6fd075f1806e375f66ce436cca15e085f0088118] | committer: Justin Ruggles
adxdec: Validate channel count to fix a division by zero.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6fd075f1806e375f66ce436cca15e085f0088118
---
libavcodec/adx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/adx.c b/libavcodec/adx.c
index aa90fd8..1e5d89c 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 */
More information about the ffmpeg-cvslog
mailing list