From patchwork Thu Jun 4 20:03:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Foucu X-Patchwork-Id: 20151 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 9E18E449AEE for ; Thu, 4 Jun 2020 23:03:13 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 73FF268AFB1; Thu, 4 Jun 2020 23:03:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 914F768AA92 for ; Thu, 4 Jun 2020 23:03:05 +0300 (EEST) Received: by mail-pg1-f193.google.com with SMTP id p21so3967286pgm.13 for ; Thu, 04 Jun 2020 13:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RvQrUFGsdX2fS66mlRYaRaPtpw82uj9WsjBZ0VoC6+8=; b=EiB24OPivp1f9Ph72MEvpKaDAHcu71nvb5MvG2upQeeRHq8Oz7jPv8IJbPB3wldHIK UTFwQSfSS4d3LSe12Zlpl6o/IaWUsTMMYwegzHfXcZnxgGkpvwHttVmRi9U4YcLjEu/K zk0HPRS2H9B53WIu+p15316tLUIuF4jjK6JtkPfdfwcFuIscI6OcQEF9Vp6sVQmgeQmg sHW4kNEH1JqaKDQ7IKZ4S//IHw0hE3KBmQO6QBz2Zp1C0eJZz43NbZ8duCQSD0dm7CSw pXXUjy4ZjmJyibUgumkN4op4fzyI6ITw96JG5Cz7vURSMkJd65R8qqAt+eu7q6RpkEo3 /ODg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RvQrUFGsdX2fS66mlRYaRaPtpw82uj9WsjBZ0VoC6+8=; b=DxPhDV3z18bKioeI2AdrxnNq0G6A1eThUub6vM7h2f2Yj/7NVckAlJbtgpr4f2Nhew jn6IVmYr+so1FKnqkvMnywY0Wp5U6jLmNLcyEbcO1u8qycU220EE4hxTdEy8ocngCbYv l7/q2UNj974Dn+oYoyhm/+4NtF1qV0J7hks8h1y4G9vXHp51sB0/xEOahUB6ddcrFE7s NasEu52IGSiufTvhCARmhx4KjXNdPjvV3qpCzLka9bc2zyVNAT5W9bEzkAeookbOIPVh 0uOQnKcALCmtQ7gPCVql+wfaErgk/BnZP8QGJ/+LGACCnTNKR11KEs9s+YTPErKbLSer pPzw== X-Gm-Message-State: AOAM530k3RzDTM/X+VphbM4+rKmxU0sLsuGohSTwNQpdvDCcLaxfHX+X lI/FVrNdVwptSQasJHYUNg6LeT1D X-Google-Smtp-Source: ABdhPJysgVNRphwSyKPNJECANz5DlxRwEujYnohkW8/ZYywHPFB05bOXxVDbaWz7uNrA6ig61n+PJQ== X-Received: by 2002:a65:6694:: with SMTP id b20mr5933693pgw.303.1591300983404; Thu, 04 Jun 2020 13:03:03 -0700 (PDT) Received: from tfoucu.mtv.corp.google.com ([2620:0:1000:4001:8e18:4d51:fb1:d54f]) by smtp.gmail.com with ESMTPSA id 207sm5057011pfw.190.2020.06.04.13.03.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2020 13:03:02 -0700 (PDT) From: Thierry Foucu To: ffmpeg-devel@ffmpeg.org Date: Thu, 4 Jun 2020 13:03:00 -0700 Message-Id: <20200604200300.156597-1-tfoucu@gmail.com> X-Mailer: git-send-email 2.27.0.278.ge193c7cf3a9-goog MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] libavcodec/png_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer. 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 Cc: Thierry Foucu Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" the target_dec_fuzzer is checking for the avpkt.data pointer but if the png parser cannot combine the frame, the poutbuf is not set. --- libavcodec/png_parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/png_parser.c b/libavcodec/png_parser.c index 74f2964118..9ec8551a1b 100644 --- a/libavcodec/png_parser.c +++ b/libavcodec/png_parser.c @@ -45,6 +45,7 @@ static int png_parse(AVCodecParserContext *s, AVCodecContext *avctx, s->pict_type = AV_PICTURE_TYPE_NONE; *poutbuf_size = 0; + *poutbuf = NULL; if (!ppc->pc.frame_start_found) { uint64_t state64 = ppc->pc.state64;