diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-05-25 22:22:27 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-06-15 22:31:13 +0200 |
commit | 06b84f7271a013a32f213f89997317239671bd4d (patch) | |
tree | 918ef30e38d2ed397c2c1a6e4461d157c7a02b90 | |
parent | f974cc98309eb48fb94f3226a519c7d16320ad8d (diff) | |
download | ffmpeg-06b84f7271a013a32f213f89997317239671bd4d.tar.gz |
avcodec/ac3dec: Fix null pointer dereference in ac3_decode_frame()
Fixes: index 8 out of bounds for type 'uint8_t *[8]'
Fixes: 7273/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EAC3_fuzzer-6296497667702784
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e3f656f2dea6ef6e2a14e72931f3d6f205f732c8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/ac3dec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 1d3180b935..317b2bd800 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -1738,7 +1738,9 @@ dependent_frame: for (ch = 0; ch < avctx->channels; ch++) { int map = extended_channel_map[ch]; - memcpy((SHORTFLOAT *)frame->data[ch], s->output_buffer[map], + av_assert0(ch>=AV_NUM_DATA_POINTERS || frame->extended_data[ch] == frame->data[ch]); + memcpy((SHORTFLOAT *)frame->extended_data[ch], + s->output_buffer[map], s->num_blocks * AC3_BLOCK_SIZE * sizeof(SHORTFLOAT)); } |