Commit bff5b2c1 authored by Justin Ruggles's avatar Justin Ruggles

atrac1: validate number of channels

parent 9a35ff38
......@@ -332,6 +332,11 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx)
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
if (avctx->channels < 1 || avctx->channels > AT1_MAX_CHANNELS) {
av_log(avctx, AV_LOG_ERROR, "Unsupported number of channels: %d\n",
avctx->channels);
return AVERROR(EINVAL);
}
q->channels = avctx->channels;
/* Init the mdct transforms */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment