diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-06-27 16:51:51 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-07-16 19:02:12 +0200 |
commit | 20c5fb972101fa25dedaf35a9c0ce2bf02fa6b52 (patch) | |
tree | 55d7cf3536c01205a8fbf54a87f661390ad49c6e | |
parent | 841e1399e6d0db35fb4d1f75c87a6f467323d64d (diff) | |
download | ffmpeg-20c5fb972101fa25dedaf35a9c0ce2bf02fa6b52.tar.gz |
avformat/movenc: Check that frame_types other than EAC3_FRAME_TYPE_INDEPENDENT have a supported substream id
Fixes: out of array access
Fixes: ffmpeg_bof_1.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ed22dc22216f74c75ee7901f82649e1ff725ba50)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/movenc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 44f468d19f..3d2905648b 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -433,6 +433,12 @@ static int handle_eac3(MOVMuxContext *mov, AVPacket *pkt, MOVTrack *track) info->ec3_done = 1; goto concatenate; } + } else { + if (hdr->substreamid != 0) { + avpriv_request_sample(mov->fc, "Multiple non EAC3 independent substreams"); + ret = AVERROR_PATCHWELCOME; + goto end; + } } /* fill the info needed for the "dec3" atom */ |