From patchwork Sun Apr 16 16:48:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 41211 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp1839147pzb; Sun, 16 Apr 2023 09:49:52 -0700 (PDT) X-Google-Smtp-Source: AKy350ZY0dhKFBSR0ldhLDpnjb54GliQmJcGIXtNILkTFnKoeieolMnkM0fWOiOwBfoGSGmi30WB X-Received: by 2002:a17:907:844:b0:94f:61f5:9ef7 with SMTP id ww4-20020a170907084400b0094f61f59ef7mr1898548ejb.44.1681663792573; Sun, 16 Apr 2023 09:49:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681663792; cv=none; d=google.com; s=arc-20160816; b=ftUPg7UgR/6OMOrycP4ljH1J2X6IKC0N7oPJoPF46T1c7W+rr4wFDT4XB3DJAnvcdD 97mrEtKVkfr8xatzXzAKasPJO+Gl87Tc1NudFU5X9Nzes9zMzzzqkRDoL0bm3bISDZoO xpPMGzOYQ/od0xiNFqzIMOYnbGPwVWvYVyviROHy/B1dgs2pnYaDnESD/LSm+yUDBvjG 1eulfdMqy1OHx55mWp1AL9NK6E9mOBriTRw2zpzuife9PYA4QdnKmylnl3ch19PYUhZP I5aKDptAJIYV6Y2itMgEakmFObFLEK3P3IXiWKi3WjtMFxLVhYODyoH3ZSyvH+tGlULA OcOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=KKDciejrT2iK2DpdoN+V5fuKcA4I34t4Rsbt17LQmUo=; b=vQLwCxrEq14aWPh3kZpXFz86mInRzenXS6gAa3CjDzfPxc1Yfk2hxyJrQlP7+YkK0p fd6+d+Xpqy27JHqLcuKSWrmYuVK+giPIKuV40Q8bRh+MplyOD39bjHLFUUgib6+aYDnR BZnMkSZeZL+MCKF2ypbZtt60YawTRXdlSHXUYGWM/A5qgvh3D8fkUBqg20EnAo4NuKNi ofupOU41q1uNP61f4sW3iWyJDQMtnT1UpQ9i5jN2LjnsGBf7W0p8OpmjmzBqZSNKDNxX IWlABjoVbyixwaFXjXwmodB0SgE/yTdixe4UlR2PQ8aikfhgyLUlEksuVzRI8kXfA9yn SzSg== ARC-Authentication-Results: i=1; mx.google.com; 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 wg10-20020a1709078f0a00b0094f547d5444si1590992ejc.352.2023.04.16.09.49.52; Sun, 16 Apr 2023 09:49:52 -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; 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 7F23668BE42; Sun, 16 Apr 2023 19:48:53 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0A77468BE2E for ; Sun, 16 Apr 2023 19:48:45 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id D473E240002 for ; Sun, 16 Apr 2023 16:48:44 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 16 Apr 2023 18:48:25 +0200 Message-Id: <20230416164830.15664-6-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230416164830.15664-1-michael@niedermayer.cc> References: <20230416164830.15664-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 06/11] avcodec/utils: the IFF_ILBM implementation assumes that there are a multiple of 16 allocated 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: uvJXTSAaWI61 Fixes: out of array access Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5124452659888128 Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-6362836707442688 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 599da21dba2..ef1845954e8 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -317,7 +317,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, } if (s->codec_id == AV_CODEC_ID_IFF_ILBM) { - w_align = FFMAX(w_align, 8); + w_align = FFMAX(w_align, 16); } *width = FFALIGN(*width, w_align);