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 87B9C4A665 for ; Mon, 3 Jun 2024 19:16:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E45CE68D6A4; Mon, 3 Jun 2024 22:16:46 +0300 (EEST) Received: from mail-4323.proton.ch (mail-4323.proton.ch [185.70.43.23]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1BB3068D265 for ; Mon, 3 Jun 2024 22:16:40 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marcusspencer.xyz; s=protonmail; t=1717442198; x=1717701398; bh=W/HGKel2NAEBRnClulRkb9RKo5UygVPUtjRYU6TfO80=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=eFSCS5zHGDE7aEVTs5brvTfTomu3kT9aOXh703MUy4OYP2lRexuKww2vgHLl3P2a+ vjv6Lnn058QKpZ8N2OWNea3iA+rAUjx6mjNxO86oM9PjWFcN40kWonQF19SeGB1ylW WMFewLppPwab6gAtX5fwqAHw4OQISbG/AUXo2RCmca+GvdnIza85EDC0tY+wxXrp3X kRKm5+XARw/xi5vk4H83ZUvr9us22Vy5o09+jlum36PUsFj2Xtnrw+V8ax3DrrK1AD 1U03vlgJ4ZGrKkd2AD0KEduf/GgLdMuHP4Oow/XLMXKPnKoiuTc+k1/oEnqL4NqQLU AVy7vSQeZSrOw== Date: Mon, 03 Jun 2024 19:16:32 +0000 To: FFmpeg development discussions and patches From: marcus Message-ID: In-Reply-To: References: <20240603033321.357618-1-marcus@marcusspencer.xyz> Feedback-ID: 34157397:user:proton X-Pm-Message-ID: 35bb95058eaae3b4f9302c8b86c48e4db45770eb 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. Did you incorrectly format that message? Or did you really mean that the UB when the size is greater than INT_MAX doesn't affect my patch? > > /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".