mirror of https://git.ffmpeg.org/ffmpeg.git
alac: check channel count more completely, fix out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b119133136
commit
001af703c6
|
@ -638,7 +638,7 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
|
|||
else
|
||||
avctx->channels = alac->channels;
|
||||
}
|
||||
if (avctx->channels > MAX_CHANNELS) {
|
||||
if (avctx->channels > MAX_CHANNELS || avctx->channels <= 0 ) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Unsupported channel count: %d\n",
|
||||
avctx->channels);
|
||||
return AVERROR_PATCHWELCOME;
|
||||
|
|
Loading…
Reference in New Issue