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 5EE734ACB1 for ; Tue, 18 Jun 2024 13:48:37 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B270168D7C2; Tue, 18 Jun 2024 16:48:34 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ED76B68D28D for ; Tue, 18 Jun 2024 16:48:27 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 2DA03C0003 for ; Tue, 18 Jun 2024 13:48:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1718718507; 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; bh=Lx5SWFzOG1k34znJjvh07r7VAhOXTa782NUcZRdRuVM=; b=hTvuUuVVYIfd/D+Fwk1ur28OC7W8DyItBZYs12oVOM1qc5gGHaGwvrB1bA0+6RpfjcCWep DyEgqGellzqD9vZpI5vMvV24sgwMs7ki2L8NpswPOe4kwyMFfDgZxqFMAC1TLSD3NM1mLV +824JnuoVhOumkGTltWGQEjYn09j7htaJLrs4yT5nofjWhvxkoLnA8V3YBqLmxuzV/eGDf jmky22uvWICMMZUDRbF+aHvM/lHq5Rbg81Ie6W6FL+Dqd5wPQ2Zzv0OnOEH8xPaeYsGetQ Pgjx7pmcVJIUG9Nv3aMQfUopd25oAM/GmY5qlOe8BYAzBI98mydza8yOQJlkRg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 18 Jun 2024 15:48:20 +0200 Message-ID: <20240618134826.2189719-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 1/7] avcodec/utils: apply the same alignment to YUV410 as we do to YUV420 when motion estimation is used 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 snow encoder uses block based motion estimation which can read out of array if insufficient alignment is used Fixes: out of array access Fixes: 68963/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-4979988435632128 Fixes: 68969/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-6239933667803136.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 337c00e789a..7914f799041 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -259,6 +259,9 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, if (s->codec_id == AV_CODEC_ID_SVQ1) { w_align = 64; h_align = 64; + } else if (s->codec_id == AV_CODEC_ID_SNOW) { + w_align = 16; + h_align = 16; } break; case AV_PIX_FMT_RGB555: -- 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".