mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 17:30:00 +01:00
avcodec/aac/aacdec: dont allow ff_aac_output_configure() allocating a new frame if it has no frame
Fixes: null pointer dereference
Fixes: crash_test.mp4
Found-by: Intel PSIRT
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fcf180d9ea)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -454,6 +454,9 @@ static int output_configure(AACContext *ac,
|
||||
uint8_t id_map[TYPE_END][MAX_ELEM_ID] = {{ 0 }};
|
||||
uint8_t type_counts[TYPE_END] = { 0 };
|
||||
|
||||
if (get_new_frame && !ac->frame)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (ac->oc[1].layout_map != layout_map) {
|
||||
memcpy(ac->oc[1].layout_map, layout_map, tags * sizeof(layout_map[0]));
|
||||
ac->oc[1].layout_map_tags = tags;
|
||||
|
||||
Reference in New Issue
Block a user