From patchwork Sun Aug 4 20:53:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 50898 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:1f5a:b0:489:2eb3:e4c4 with SMTP id jm26csp1052572vqb; Sun, 4 Aug 2024 14:01:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV/4/loVyWfxEiIxhFNXzmCJpy7hwKzrAyZobIKMWllAXppO3Qn7TEfbN/9yeM91NCPYNKLWgPqCbMXRb+mBr+zig0VdXoYY4Uyhg== X-Google-Smtp-Source: AGHT+IGR3m2TdJbBI77W/nyQLoGZNFdKTijcmL7k/xyTQn9iuv4gTJakCMer5jOI4X9ulr05iUgs X-Received: by 2002:a05:6512:10d5:b0:52f:244:206f with SMTP id 2adb3069b0e04-530bb3c7ea3mr6214085e87.53.1722805273887; Sun, 04 Aug 2024 14:01:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722805273; cv=none; d=google.com; s=arc-20160816; b=hBVkM6OgR58TnA/bfvW8wjWK3bGqYRc7vmBSo6QJKpIT0/EeL/2fs6q+MWm/Zrw9BP 6kJIy9V6miv8C/tiRgM8evruc4OVnnBGtmLt4w0N+wE6VdPfG4uju0H/1dXwA5wT6w/A WGIGYVRpMjMibj3Ovj4x3NbJbLJRDVr3OwrcJ+x81fB1XptrMDjJZnu6FYJVASu0sHba U82TzPkNnGWPfipUmWo+keJ63jRPhCMta8nSq7gkckn5cPRgFxCMR1IOO6PBSHm5sUVG 0pac2vgipKjlZph5ymTVdN0Tv2+h7LALVAQbvj/bmolccsXjww7k7S2zuVL6aKO2HUHI ThtA== 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=cwpkRyKVHj+7G7MbzaPU2reDab27RhP0wYZxVJ5n3l0=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=AEg4BmOop6+fgZKqEtYwX0TLb1DXqcxolyKolV6c5Zk0HHayaDDIrVIdwm1Mw+ETC9 8Ry/ewaBd+/F+NCupQfr+zMU9Ym99PYNQK4khAdnW6ndrogpK7d4pxZd7QJ0KZiwVGba EIKYTsoIvMScfuvQ5CSu7w1ISFViOmTJgQV/5JzVjDLlWY+DgQuTWjhZuQ0HjK1l6xlN evl7T0/9iJIejIOLbNd446w2CNUyQQohmztTvpANzJcDjp23fOciDjtmq1RtLjgsiAbU LIVGi5VTJg+LIDv+TKrLr5ZeEx6/fiDQOVPHcexaCPfVHxOfRqfSYcZq5gYLbjkWCulx tnSA==; 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=dLyqZrv6; 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-530bba0446asi1969629e87.110.2024.08.04.14.01.13; Sun, 04 Aug 2024 14:01:13 -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=dLyqZrv6; 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 4C25668D988; Sun, 4 Aug 2024 23:53:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 748CE68D96B for ; Sun, 4 Aug 2024 23:53:17 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id D35901BF207 for ; Sun, 4 Aug 2024 20:53:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1722804797; 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=S75XJpYQGlGxfLzxyOySXQ2ZFXyteDOTz5YDpptYYtE=; b=dLyqZrv6MBq+1e+kG1BjRcu8cYR3o2crqANxBVZFT5gt+hrjUAN1kgth+NvhKnH1hxjO78 /VFoFzCFXlL5epYgfAKPD/H6VIAM9pDh6mmaNf8y2UylRguFw6UQhZ7APXicb9LU7EjZP/ RfE9lfcZHecZxLnlWaSL3KDW3qENQzq9wsrcJ2XLJMYuCv6Hv2AWz9ogsqQ44V6F2uiMPs FvJ/fYhVCDK7cu/TlbfM46IK2W7zRJqSy7H+lv3dFxgOe/69EPvFt0Uaw28Sll6jXBdygl 4UWi499PLFQnZ6DQEEwo0xSuNK40oxRaBAkLl2UtVcu5pVXPDbuGWSdHHzRdWg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 4 Aug 2024 22:53:09 +0200 Message-ID: <20240804205309.1978196-8-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240804205309.1978196-1-michael@niedermayer.cc> References: <20240804205309.1978196-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 8/8] avcodec/alsdec: clear last_acf_mantissa 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: WHFd2HSE0Hkd Fixes: use-of-uninitialized-value Fixes: 70869/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5476567461986304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/alsdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index f4f67917d76..28f20799854 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -2112,7 +2112,7 @@ static av_cold int decode_init(AVCodecContext *avctx) ctx->acf = av_malloc_array(channels, sizeof(*ctx->acf)); ctx->shift_value = av_calloc(channels, sizeof(*ctx->shift_value)); ctx->last_shift_value = av_calloc(channels, sizeof(*ctx->last_shift_value)); - ctx->last_acf_mantissa = av_malloc_array(channels, sizeof(*ctx->last_acf_mantissa)); + ctx->last_acf_mantissa = av_calloc(channels, sizeof(*ctx->last_acf_mantissa)); ctx->raw_mantissa = av_calloc(channels, sizeof(*ctx->raw_mantissa)); ctx->larray = av_malloc_array(ctx->cur_frame_length * 4, sizeof(*ctx->larray));