mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 16:22:37 +00:00
adxdec: Validate channel count to fix a division by zero.
This commit is contained in:
parent
4f1a787744
commit
6fd075f180
@ -58,7 +58,7 @@ int avpriv_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf,
|
|||||||
|
|
||||||
/* channels */
|
/* channels */
|
||||||
avctx->channels = buf[7];
|
avctx->channels = buf[7];
|
||||||
if (avctx->channels > 2)
|
if (avctx->channels <= 0 || avctx->channels > 2)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
/* sample rate */
|
/* sample rate */
|
||||||
|
Loading…
Reference in New Issue
Block a user