From patchwork Fri Aug 16 23:11:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 51046 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b6ca:0:b0:48e:c0f8:d0de with SMTP id s10csp731768vqj; Fri, 16 Aug 2024 16:12:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVk18PlKOS1jlckdr7NOd+8L8SockDJBi4iTLgwpCfqkgXORbxoMCRJFSHT7jL+Kw7lgtZ0MwQ2y8FvI9/rzGN4nY0KUlAKSjEF1g== X-Google-Smtp-Source: AGHT+IElzBh/d8OVeoEvCoo11TV4A+fBMsjPKdMmgrOEP9PF0M3ACGF/p6jVM1nC8rd3cH4AHXN0 X-Received: by 2002:a05:6512:3b21:b0:52e:99fd:d386 with SMTP id 2adb3069b0e04-5331c6e51femr2976933e87.50.1723849958664; Fri, 16 Aug 2024 16:12:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723849958; cv=none; d=google.com; s=arc-20160816; b=BNlcnZnOHGMb0Kj4C32bgmZz38ulCh3cTfmjld9nzHrHkwlubsYRFOYmsBs1bnSF1y yRQr0efmWfTDm7Ee8oHX+CY0UeCkcMGVm+ukcXOzRQNPYNZO4gIMEn/mvPGJcak332t3 YjHggGrywe1MkOOfpYSFWNpxQOpDx3TdOQwEk56dDVLP58q8DAExms8WIRlW7AD7Ydrf 7jnjH7b1Mvlx+q0HcScPKbyLdlzB5TAEdbbbpM0wP9/LW011fCC+dBL3UCTzQx9pmj+6 Prv00GN5X9OxtgqF8B60jrBfNKO31sigxczx8obJwCDSnGv2n3Pcw2fhM5Ho5leASfBw qHww== 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:dkim-signature:delivered-to; bh=mp9CWo+WYzVqECuHPmY2ie9Y48W/cubFEfVqOo2O/CM=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=xhuJOs2QLDG9hsMpvFT/QMVK3HegwmqFdxRbE/oWfMAdHrLAefXJ24QbqS+AEpjd7e P+vG5n4gwPTedpz/k9hNerJLwmO+/pB0Nb1lxCzB1qpuQH7+eIUwVG4fVcQS8cXPSwLg 1C2+nayztZtEMKTpBeRbibP5IS/ScAxbgNGPiDZtv7j2wtivycRG0GqiFE5+6fKspmyP QjY1plkPJIaDRDFD5Fhlk9kHDTMu4a7/NKr/eSeH3TnTIo9NVPW/jdPybLShm+Li0fpp XZM6aZH/mHRSfbPNypKQUeLbxjwlhMUCTS1os6xBGdvTxLPc3Vsyv8kG3JwQzgikk26d 0uBQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=gAm7rJBN; 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 2adb3069b0e04-5330d41cf78si1252978e87.391.2024.08.16.16.12.38; Fri, 16 Aug 2024 16: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; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=gAm7rJBN; 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 0CF1D68DCAD; Sat, 17 Aug 2024 02:12:10 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AABDD68DC9F for ; Sat, 17 Aug 2024 02:12:02 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id DC44F240002 for ; Fri, 16 Aug 2024 23:12:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1723849922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3fUzCGXU0NmCH7mRy0WYV38QWfTqSzcaaGosBVyejlw=; b=gAm7rJBNBEb/AcemJyx2orpHITQSsoB4J06VJkTjnFUh64HTM9K98Vft0pBl4iofRXzo6e Llsvp2IwwkOMO3vAgNV5NS1+8sSbZ2Ow0UdlR0++x8DGvU6xPLgcXKYnp+OyVFIhjU8UKl MKOsUc03Cf5hnY2poMvV8onKEPdIgcOZLveT8BOgAtprVpQ4uZhDa4CG0DUpytikooxkFy 6nymEF3wRR+BNRnnJyVlz3cOjB7ONdC9hJubOapfK9/SKjkQ70cFr8b3cC7TvhI7OO+IWV PO+mBb//IOXltsQ1y1spXOyzGoUfB52PY7NHWeRP61QqAQOvHVuOp1Wu5ey7yA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 17 Aug 2024 01:11:52 +0200 Message-ID: <20240816231157.3166012-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816231157.3166012-1-michael@niedermayer.cc> References: <20240816231157.3166012-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 4/9] avformat/jpegxl_anim_dec: clear buffer padding X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: JXutpqye6iuH Fixes: use of uninitialized value Fixes: 70992/clusterfuzz-testcase-minimized-ffmpeg_dem_IMAGE2_fuzzer-5735819170611200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/jpegxl_anim_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/jpegxl_anim_dec.c b/libavformat/jpegxl_anim_dec.c index 2338a2e8c07..7798f3dabc2 100644 --- a/libavformat/jpegxl_anim_dec.c +++ b/libavformat/jpegxl_anim_dec.c @@ -43,7 +43,7 @@ typedef struct JXLAnimDemuxContext { static int jpegxl_anim_probe(const AVProbeData *p) { - uint8_t buffer[4096 + AV_INPUT_BUFFER_PADDING_SIZE]; + uint8_t buffer[4096 + AV_INPUT_BUFFER_PADDING_SIZE] = {0}; int copied = 0, ret; FFJXLMetadata meta = { 0 };