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 85A1C4B364 for ; Tue, 9 Jul 2024 15:14:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 681B568DBA2; Tue, 9 Jul 2024 18:14:47 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7B85468DA8D for ; Tue, 9 Jul 2024 18:14:40 +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=NC+y3c3H; dkim-atps=neutral Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 328C1240DAE for ; Tue, 9 Jul 2024 17:14:40 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id cVe9UQ1bvWQA for ; Tue, 9 Jul 2024 17:14:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1720538077; bh=s0Tn0Y8QbqPldlQcyeqIonKe9idt/SyEA0BMF0OsgAY=; h=Subject:From:To:In-Reply-To:References:Date:From; b=NC+y3c3HqdMHn3ZYOL2TQu6fHCxlEdkVKl9B4IF4OznNttKQCNA4Qpf4dpuJvn0K6 4LWU90eNhAQ/8WLnFm+2NBQISZcH/6bTXznXaC81ekHMYdztaNakLcRv1ulIPhmnfQ ti+YnQFNheeJqKJiwxsVUOTadCpurZV6r5z3c7IZto1JbM8gAHpsS4EiAm06rXHzuF tb3d8FjXsonvUQkPPXxijT9IdbkR+Yo904nBMrcjyNInWwHoPfgjL6d40Xv/EVTGnF PcyKnBNZEKo9SAEpqfuAHK9XdNyzvWXhnuGLp2oOdqnVgiiNt457Q+IBCz9pWiKw5d 1B0i6V5sbnZEw== 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 E0B812404E5 for ; Tue, 9 Jul 2024 17:14:37 +0200 (CEST) Received: by lain.khirnov.net (Postfix, from userid 1000) id BE0D61601B9; Tue, 9 Jul 2024 17:14:37 +0200 (CEST) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20240709132810.GA4991@pb2> References: <20240709113626.1836680-1-michael@niedermayer.cc> <172053107806.21847.11044848590089039731@lain.khirnov.net> <20240709132810.GA4991@pb2> Mail-Followup-To: FFmpeg development discussions and patches Date: Tue, 09 Jul 2024 17:14:37 +0200 Message-ID: <172053807774.21847.8430412564103918732@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-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. -- 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".