Skip to content

Commit ed22dc2

Browse files
committed
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>
1 parent 75a2db5 commit ed22dc2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: libavformat/movenc.c

+6
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,12 @@ static int handle_eac3(MOVMuxContext *mov, AVPacket *pkt, MOVTrack *track)
437437
info->ec3_done = 1;
438438
goto concatenate;
439439
}
440+
} else {
441+
if (hdr->substreamid != 0) {
442+
avpriv_request_sample(mov->fc, "Multiple non EAC3 independent substreams");
443+
ret = AVERROR_PATCHWELCOME;
444+
goto end;
445+
}
440446
}
441447

442448
/* fill the info needed for the "dec3" atom */

0 commit comments

Comments
 (0)