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 72B164B2E8 for ; Mon, 3 Jun 2024 12:35:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8AE0468D667; Mon, 3 Jun 2024 15:35:26 +0300 (EEST) Received: from glom.nmugroup.com (glom.nmugroup.com [193.183.80.6]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A6B1568CFA9 for ; Mon, 3 Jun 2024 15:35:19 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by glom.nmugroup.com (Postfix) with ESMTP id 326195428CAF for ; Mon, 3 Jun 2024 14:35:19 +0200 (CEST) Received: from debian.lan (unknown [IPv6:2a00:66c0:a::72c]) (Authenticated sender: git01) by glom.nmugroup.com (Postfix) with ESMTPSA id F22125425D5A for ; Mon, 3 Jun 2024 14:35:18 +0200 (CEST) Message-ID: From: Tomas =?ISO-8859-1?Q?H=E4rdin?= To: FFmpeg development discussions and patches Date: Mon, 03 Jun 2024 14:35:17 +0200 In-Reply-To: References: <20240603033321.357618-1-marcus@marcusspencer.xyz> User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH v2] avcodec: add farbfeld encoder 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: > Check the return value of av_image_get_buffer_size() before adding > HEADER_SIZE to it. There will be a signed overflow (UB) for images of > size 16385x16385 (and many others). Sorry, I missed the multiplication by h+128 in av_image_check_size2(). So this isn't a problem in this specific case. > Aside: av_image_get_buffer_size() will UB for sizes above INT_MAX > because the size_t's in sizes[] get accumulated into an int. Besides > the UB it also returns incorrect values. This however *is* a problem for planar formats. This doesn't affect this patch however. /Tomass _______________________________________________ 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".