You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-05-16 08:38:24 +02:00
avcodec/aacdec_template: Check id_map
Fixes index out of bounds error
Fixes: aac_index_out_of_bounds.wmv
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 590863876d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -449,6 +449,10 @@ static int output_configure(AACContext *ac,
|
|||||||
int type = layout_map[i][0];
|
int type = layout_map[i][0];
|
||||||
int id = layout_map[i][1];
|
int id = layout_map[i][1];
|
||||||
id_map[type][id] = type_counts[type]++;
|
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
|
// Try to sniff a reasonable channel order, otherwise output the
|
||||||
// channels in the order the PCE declared them.
|
// channels in the order the PCE declared them.
|
||||||
|
|||||||
Reference in New Issue
Block a user