mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avformat/mxfdec: check channel number in mxf_get_d10_aes3_packet()
Fixes: Out of array access
Fixes: 37030/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5387719147651072
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3dd5a8a135
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
ea7b135a1b
commit
c8174013f2
@ -403,6 +403,10 @@ static int mxf_get_d10_aes3_packet(AVIOContext *pb, AVStream *st, AVPacket *pkt,
|
||||
data_ptr = pkt->data;
|
||||
end_ptr = pkt->data + length;
|
||||
buf_ptr = pkt->data + 4; /* skip SMPTE 331M header */
|
||||
|
||||
if (st->codec->channels > 8)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
for (; end_ptr - buf_ptr >= st->codec->channels * 4; ) {
|
||||
for (i = 0; i < st->codec->channels; i++) {
|
||||
uint32_t sample = bytestream_get_le32(&buf_ptr);
|
||||
|
Loading…
Reference in New Issue
Block a user