ffmpeg | branch: release/2.7 | Michael Niedermayer <mich...@niedermayer.cc> | Sun Jan 10 19:29:39 2016 +0100| [d755045e7801a4ceb35027ab9bf069f7e6ecc221] | committer: Michael Niedermayer
avcodec/aacdec_template: Check id_map Fixes index out of bounds error Fixes: aac_index_out_of_bounds.wmv Found-by: Piotr Bandurski <ami_st...@o2.pl> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> (cherry picked from commit 590863876d1478547640304a31c15809c3618090) Conflicts: libavcodec/aacdec_template.c > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d755045e7801a4ceb35027ab9bf069f7e6ecc221 --- libavcodec/aacdec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index 9fe1133..8030827 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -473,6 +473,10 @@ static int output_configure(AACContext *ac, int type = layout_map[i][0]; int id = layout_map[i][1]; id_map[type][id] = type_counts[type]++; + if (id_map[type][id] >= MAX_ELEM_ID) { + avpriv_request_sample(ac->avctx, "Remapped id too large\n"); + return AVERROR_PATCHWELCOME; + } } // Try to sniff a reasonable channel order, otherwise output the // channels in the order the PCE declared them. _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog