From patchwork Wed Jun 27 18:11:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 9520 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:104:0:0:0:0:0 with SMTP id c4-v6csp1152948jad; Wed, 27 Jun 2018 11:12:38 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdcItMcdbReni0MCjn/+3bMB9EiOO/cMK1mEvh+BDg8CXFiu6mWg8yQRS1Pwqs48e5IjXLt X-Received: by 2002:a1c:8f50:: with SMTP id r77-v6mr6101093wmd.77.1530123158710; Wed, 27 Jun 2018 11:12:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530123158; cv=none; d=google.com; s=arc-20160816; b=jmMU3K32XKIzo4ZZn/cd7qSjMJuGN5wrmEiOXu9GdbIYL6iPKgUHB360BF5UqIvHQ3 D4FwugwJ/MfsrGNbIzsVrXxb5n2/g5Bir9Ru/lLdIVhuoQkzWsd+nYzW7jO51ll5KAc4 ca7d2TVgb1OhX0W+zQLx0DELAJSo7jTpGhZXqS4e0Iu+HrnXq45vmLl4lBOrCnFOhD/t TKK3QwVIOKxgJm1xKBdJKxPZutLbBfhqOTHFPbuRa2tUgu+ciMvKzfJ2b+KgQieNP2la yLxVIAQuf60eP6pUv9oanmgak0j/UyqGAEF20DgVw/8JrZ11KrvC8lIBbqJ9EujoGs+g dfog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to:arc-authentication-results; bh=/f35FWaSGxMgqjcUSsqIX9CuDpk8RilA4QAR2EjXwJQ=; b=ACqzNiJySWXddYKepvqxZw6ciWD2zisBgF/PCAW+mpID0+CYVT//IjW+Ns0i7QUsAy bdO1kYakVbyhzMjY0L/OBsHdw06QQCWWsMi1YSapuhc4aAr8h/HB/UF3c7xer5/LMrcD DIxD7HWioayc5v2XeH4A+E+d5ilklsEPT4xFvNQvXbFZMO5uLaFCmABxqLD/yOVqFmXo mCX5nxlQCRemXyu37iB1giOJ77Z6m4Ioqo8oTinI5ZVIiZ2InFQRJloGbSn+/lMqlBh8 GXM6hWEanA/SIMdCfJX8XHn2Iho12YMqbhQvOp6lLGrH02MZ7apFgtg9Bq+22tu1zfdD xmhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id o23-v6si3295551wmc.93.2018.06.27.11.12.38; Wed, 27 Jun 2018 11:12:38 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 089AA68A449; Wed, 27 Jun 2018 21:12:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe04-2.mx.upcmail.net (vie01a-dmta-pe04-2.mx.upcmail.net [62.179.121.164]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4CC6268A38B for ; Wed, 27 Jun 2018 21:12:13 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe04.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1fYEvO-0000BC-4i for ffmpeg-devel@ffmpeg.org; Wed, 27 Jun 2018 20:12:14 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id 3uCA1y01z0S5wYM01uCCqw; Wed, 27 Jun 2018 20:12:12 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 27 Jun 2018 20:11:19 +0200 Message-Id: <20180627181121.30735-6-michael@niedermayer.cc> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180627181121.30735-1-michael@niedermayer.cc> References: <20180627181121.30735-1-michael@niedermayer.cc> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/8] avformat/movenc: Do not pass AVCodecParameters in avpriv_request_sample X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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 --- libavformat/movenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 00567db586..2603b9c95f 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -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, "Multiple independent substreams"); ret = AVERROR_PATCHWELCOME; goto end; } else if (hdr->substreamid < info->num_ind_sub || @@ -439,7 +439,7 @@ static int handle_eac3(MOVMuxContext *mov, AVPacket *pkt, MOVTrack *track) } } else { if (hdr->substreamid != 0) { - avpriv_request_sample(track->par, "Multiple dependent substreams"); + avpriv_request_sample(mov, "Multiple dependent substreams"); ret = AVERROR_PATCHWELCOME; goto end; }