git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b119133
)
alac: check channel count more completely, fix out of array read
author
Michael Niedermayer
<michaelni@gmx.at>
Tue, 13 Nov 2012 21:07:39 +0000
(22:07 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Tue, 13 Nov 2012 21:08:09 +0000
(22:08 +0100)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/alac.c
patch
|
blob
|
history
diff --git
a/libavcodec/alac.c
b/libavcodec/alac.c
index
b705343
..
49ccaac
100644
(file)
--- 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;