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 34018481A4 for ; Wed, 10 Jul 2024 08:24:09 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 47B5A68AC25; Wed, 10 Jul 2024 11:24:06 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 90B5968D8D6 for ; Wed, 10 Jul 2024 11:23:59 +0300 (EEST) Authentication-Results: mail0.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=nMH/b++p; dkim-atps=neutral Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 5556D240DB7 for ; Wed, 10 Jul 2024 10:23:59 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id LMNBKSGzF5_N for ; Wed, 10 Jul 2024 10:23:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1720599837; bh=AN23mNmYTI1jczwZCAAtmFVCzsEuY2ZikM5cgYerK0Y=; h=Subject:From:To:In-Reply-To:References:Date:From; b=nMH/b++pHGLGeMUufzcwNEbR5pAfGC109rWDGfeK/TC34wmMAr5RqYL08y39Njg1W vRzZ+3gGLiomgIfNyONteIhba4TxcdQysCmH6KWjqQ/S0AEQEqzM7qJQ/HlBtdUn58 TEmspO/fQU7yhQRGxyTOSRJ3/6kFH0+gc56OB3vOhwhvI/mAI9q2cZEAIyaboAUq7j UL5Yg/5RKtF0tHawnGAckd9TJC9Gb1uhuF1dCqXjQXox8F1kj7p2ntyndLVFdnBGw/ gTNtibxGIAucEfhyDI3SQrgsDqUenbiJfS55g3Hak7XopcS4P5Lf6Fn+pwqM7Qbq+p jUh+17txzGOYw== Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 4A0EA240695 for ; Wed, 10 Jul 2024 10:23:57 +0200 (CEST) Received: by lain.khirnov.net (Postfix, from userid 1000) id 273EF1601B9; Wed, 10 Jul 2024 10:23:57 +0200 (CEST) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20240709220032.GE4991@pb2> References: <20240709113626.1836680-1-michael@niedermayer.cc> <172053107806.21847.11044848590089039731@lain.khirnov.net> <20240709132810.GA4991@pb2> <172053807774.21847.8430412564103918732@lain.khirnov.net> <20240709220032.GE4991@pb2> Mail-Followup-To: FFmpeg development discussions and patches Date: Wed, 10 Jul 2024 10:23:57 +0200 Message-ID: <172059983713.21847.3731174080920299257@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] avutil/imgutils: av_image_check_size2() ensure width and height fit in 32bit 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: Quoting Michael Niedermayer (2024-07-10 00:00:32) > On Tue, Jul 09, 2024 at 05:14:37PM +0200, Anton Khirnov wrote: > > Quoting Michael Niedermayer (2024-07-09 15:28:10) > > > On Tue, Jul 09, 2024 at 03:17:58PM +0200, Anton Khirnov wrote: > > > > > ensure width and height fit in 32bit > > > > > > > > why? > > > > > > because not everyone wants undefined behavior > > > because not everyone wants security issues > > > because we dont support width and height > 32bit and its easier to check in a central place > > > because the changed codes purpose is to check if the image paramaters are > > > within what we support, and width of 100 billion is not. You can try > > > all encoders with 100billion width. Then try to decode. > > > Iam curious, how many work, how many fail and how they fail > > > how many invalid bitstreams with no warning, how many undefined behaviors, ... > > > > > > Simply building FFmpeg on a platform with 64bit ints doesnt update > > > ISO and ITU standards to allow larger values > > > > Quoting Michael Niedermayer (2020-10-07 16:45:56): > > > At least in code i wrote and write i consider it a bug if it would > > > assume sizeof(int/unsigned) == 4 > > > > Make up your mind. > > Where do you see a contradiction ? > > 2020: assuming sizeof(int/unsigned) == 4 is a bug > 2024: we do not support more than 32bit width and height, > nor is that supported by the majority of codec bitsterams and formats > -> We thus should in a central place check that instead of generating > undefined behavior and security issues > > What i suggest IS actually fixing a "sizeof(int/unsigned) == 4" bug > > If someone wants to make the codebase work with 64bit width and height, this > should not be limited to "int is 64bit" systems that would be a very seriously > broken design and also very illogic. I don't see any existing conditions on video dimensions being 32bit, the condition currently is that every dimension and their product must fit in an int. I also don't see what actual problems does this patch address. > Also your terse replies feel a bit rude What a coincidence, your wall of patronizing blah blah that does nothing to actually answer my original question also seems pretty rude to me. Reap what you sow. -- Anton Khirnov _______________________________________________ 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".