diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-14 21:50:23 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-14 21:50:43 +0100 |
commit | 51fcf276f8ce66be530549da6b8d96a4bd3087aa (patch) | |
tree | 3903eb5679b1307c9d4f7ae850e9ca5fa3be1044 /libavcodec/mpegaudiodec.c | |
parent | a99c273a3f91c3fd616b718c34a5848411ce0258 (diff) | |
download | ffmpeg-51fcf276f8ce66be530549da6b8d96a4bd3087aa.tar.gz |
mp3on4: fix null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r-- | libavcodec/mpegaudiodec.c | 2 |
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; |