From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id C98014BBC9 for ; Wed, 14 Aug 2024 14:35:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C998768DB82; Wed, 14 Aug 2024 17:34:32 +0300 (EEST) 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 7F77468DB7A for ; Wed, 14 Aug 2024 17:34:25 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id C1CF424000A for ; Wed, 14 Aug 2024 14:34:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1723646064; 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=kcQLom0q5HVV9aorqbG/4WPH/nGEtcxcvshcpP8tvxg=; b=kWKZlY/M50nOQYeIqqWy3ctBGuW1sO8zsPTi6j4zOrc7c1cvS8X/6i+PiGCct5JEtigQz5 Hcy+60qMoqTkPXSAXgOyQ/GVeWFLTaWsYMSuRovHAd8VY0Qw6ODC/E1e4Cc6eQ7+71HGZI 0rWbH0xGZYWn32B9TUl60CYg14RHUetTKm4Sw6S/Jm4Knt4OL+Okj032MRE1+hxm638YGV RNTPtA95HfwehPXIoj6/KT4+5shJXnwobMryYO0kah6U/JMkGjUrfj+3xi8zewDv3cPkQ6 Br3ah2t+0tmQgO0pQ1jqVaV2ah6nYOagJewhmq4W2f1gnT8iOXsmnZVMRwl3QQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 14 Aug 2024 16:34:21 +0200 Message-ID: <20240814143421.3990034-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240814143421.3990034-1-michael@niedermayer.cc> References: <20240814143421.3990034-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/hapdec: Clear tex buffer 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: The code following makes no attempt to initialize all of the buffer Fixes: use of uninitialized value Fixes: 70980/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5329909059223552 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/hapdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c index 918eff78761..70bf592f2aa 100644 --- a/libavcodec/hapdec.c +++ b/libavcodec/hapdec.c @@ -310,6 +310,7 @@ static int hap_decode(AVCodecContext *avctx, AVFrame *frame, ret = av_reallocp(&ctx->tex_buf, ctx->tex_size); if (ret < 0) return ret; + memset(ctx->tex_buf, 0, ctx->tex_size); avctx->execute2(avctx, decompress_chunks_thread, NULL, ctx->chunk_results, ctx->chunk_count); -- 2.45.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".