[FFmpeg-cvslog] alac: check channel count more completely, fix out of array read
Michael Niedermayer
git at videolan.org
Tue Nov 13 22:25:47 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Nov 13 22:07:39 2012 +0100| [001af703c6bff7cb8009db3ac882b8d929d67d9e] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=001af703c6bff7cb8009db3ac882b8d929d67d9e
---
libavcodec/alac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index b705343..49ccaac 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -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;
More information about the ffmpeg-cvslog
mailing list