You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
adxdec: Validate channel count to fix a division by zero.
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user