diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-06-27 16:51:51 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-06-28 21:35:01 +0200 |
commit | ed22dc22216f74c75ee7901f82649e1ff725ba50 (patch) | |
tree | 4656f77db3cf294ceadb89624e2f2ff211359e4c /libavformat/movenc.c | |
parent | 75a2db552423295b509546f3b0f8b2b46d3424b1 (diff) | |
download | ffmpeg-ed22dc22216f74c75ee7901f82649e1ff725ba50.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>
Diffstat (limited to 'libavformat/movenc.c')
-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 e2c5613f98..6eabf32fce 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -437,6 +437,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 */ |