aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-14 21:50:23 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-14 21:50:43 +0100
commit51fcf276f8ce66be530549da6b8d96a4bd3087aa (patch)
tree3903eb5679b1307c9d4f7ae850e9ca5fa3be1044
parenta99c273a3f91c3fd616b718c34a5848411ce0258 (diff)
downloadffmpeg-51fcf276f8ce66be530549da6b8d96a4bd3087aa.tar.gz
mp3on4: fix null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpegaudiodec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 8f748f48a9..e4073ee8df 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -1965,7 +1965,7 @@ static int decode_frame_mp3on4(AVCodecContext *avctx, void *data,
avpriv_mpegaudio_decode_header((MPADecodeHeader *)m, header);
- if (ch + m->nb_channels > avctx->channels) {
+ if (ch + m->nb_channels > avctx->channels || s->coff[fr] + m->nb_channels > avctx->channels) {
av_log(avctx, AV_LOG_ERROR, "frame channel count exceeds codec "
"channel count\n");
return AVERROR_INVALIDDATA;