avformat/movenc: Do not pass AVCodecParameters in avpriv_request_sample
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 27 Jun 2018 15:27:50 +0000 (17:27 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 28 Jun 2018 19:35:01 +0000 (21:35 +0200)
Fixes: out of array read
Fixes: ffmpeg_crash_8.avi

Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/movenc.c

index 6eabf32..4ce5c23 100644 (file)
@@ -429,7 +429,7 @@ static int handle_eac3(MOVMuxContext *mov, AVPacket *pkt, MOVTrack *track)
 
             if (hdr->substreamid == info->num_ind_sub + 1) {
                 //info->num_ind_sub++;
-                avpriv_request_sample(track->par, "Multiple independent substreams");
+                avpriv_request_sample(mov->fc, "Multiple independent substreams");
                 ret = AVERROR_PATCHWELCOME;
                 goto end;
             } else if (hdr->substreamid < info->num_ind_sub ||