From patchwork Sun Aug 5 20:29:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 9904 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:104:0:0:0:0:0 with SMTP id c4-v6csp2540282jad; Sun, 5 Aug 2018 13:30:54 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyH3cgsY9J7zfU86jCB2s7pF6tApmv7bzKOBB8pAONMJ6INJF88iqneyXic6I5HtuFhjj+N X-Received: by 2002:adf:8bd4:: with SMTP id w20-v6mr3821756wra.110.1533501054698; Sun, 05 Aug 2018 13:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533501054; cv=none; d=google.com; s=arc-20160816; b=uqFauGBcY+seCU4Dg3ijPzUpgjQWyMYO8hSrfRdlAsxW9W+QYOGoxMAv3O+XLsYfNF NAjaLhu+6wevGfEF9PCqoYuBmGgRWMKZ5qSc4OxWvOYESrMU2PshGyo4cY9mPfJrhXG1 5iCDFZZPjgut9SsP0X2EGJvrzL1QgAKUk7vnhC1KBcErYu1QK43mzpAwuCtZz2F/vPzk /W/sXRnWsrW66jFONLsUV8SLgIjB/0mJoJWOyXSIy9qcUSu0tkjIhg/PpiefROLnerSJ wFvm0v8HPNzZv6vNooFxBNq+z1q5gN2i1EkT69Z/9lzUK2AETV/KyyiMMlPz4+Ms+DQ7 aXhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to :arc-authentication-results; bh=0m8A/SM0VVXIzWKxJI5Ei2Wr5Wy5ayHi9baUcT9UrZM=; b=iWGeP/fjzEC7RlcNshoJ0CAnsXxQHPuD3y0nFFqAIlPLnV3SWgi4L+BtJ31eUbUSTM cGv3G61/wGcKGwABorej/StBWA1Jlj/vkCWKZIC42/Kh7tVBnWvinTnxyAKDH/VnUSIL UG/SsqQVspZ6Hy0sZX/b55Gff61IW0yvSvvJrSEsCdtODqr3gZnoizIiJ1PgqkeyaD8n Q4YilBYf7UWF8R8tUQVqGwxToMLA05jtg/PFM80TXNLfkUKfbPjBwqdXAkxDRB8sr0GW yzXWKSRbf3tNbeyxN32D5J9IMcY1yFJmxSxLdkOtCd0WkTHjFUieW+2CjrD/JFlRLS5U v3Ug== 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 b5-v6si3989666wmc.125.2018.08.05.13.30.54; Sun, 05 Aug 2018 13:30:54 -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 DC8D868A28E; Sun, 5 Aug 2018 23:30:07 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe01-2.mx.upcmail.net (vie01a-qmta-pe01-2.mx.upcmail.net [62.179.121.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 90579689E84 for ; Sun, 5 Aug 2018 23:30:06 +0300 (EEST) Received: from [172.31.218.52] (helo=vie01a-dmta-pe08-1.mx.upcmail.net) by vie01a-pqmta-pe01.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1fmPfV-0000xy-Vi for ffmpeg-devel@ffmpeg.org; Sun, 05 Aug 2018 22:30:25 +0200 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe08.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1fmPfQ-0003QE-P5 for ffmpeg-devel@ffmpeg.org; Sun, 05 Aug 2018 22:30:20 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id KYWA1y00u0S5wYM01YWBSM; Sun, 05 Aug 2018 22:30:11 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 5 Aug 2018 22:29:29 +0200 Message-Id: <20180805202937.7563-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.18.0 Subject: [FFmpeg-devel] [PATCH 1/9] avcodec/mpegaudio_parser: Initialize poutbuf* 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Possibly fixes: null pointer dereference Possibly fixes: 9352/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MP3ADUFLOAT_fuzzer-5146068961460224 Fixes: Heap-use-after-free Fixes: 9453/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MP3ADUFLOAT_fuzzer-5137954375729152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/mpegaudio_parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c index 244281b56f..a109f12701 100644 --- a/libavcodec/mpegaudio_parser.c +++ b/libavcodec/mpegaudio_parser.c @@ -99,6 +99,8 @@ static int mpegaudio_parse(AVCodecParserContext *s1, } else if (codec_id == AV_CODEC_ID_MP3ADU) { avpriv_report_missing_feature(avctx, "MP3ADU full parser"); + *poutbuf = NULL; + *poutbuf_size = 0; return 0; /* parsers must not return error codes */ }