aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-06-27 16:51:51 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-07-10 01:52:56 +0200
commita80b8a01cc934b3417cea5c50a9f607d77f223ec (patch)
tree1e6eeeecd7eaf9337d888242bc7c89c63c4bde9e
parentfeb31c7ade15719d292c20da60763173e2ba3991 (diff)
downloadffmpeg-a80b8a01cc934b3417cea5c50a9f607d77f223ec.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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index e4acf5df3f..315839154a 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -374,6 +374,11 @@ 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");
+ return AVERROR_PATCHWELCOME;
+ }
}
/* fill the info needed for the "dec3" atom */