Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muDPF-00065Z-Sx for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Dec 2021 12:47:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1muDPE-0003ZL-O9 for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Dec 2021 12:47:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muDPE-0003ZC-EX for pgsql-hackers@lists.postgresql.org; Mon, 06 Dec 2021 12:47:44 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muDP9-00011R-HK for pgsql-hackers@postgresql.org; Mon, 06 Dec 2021 12:47:44 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A59C35C00D4; Mon, 6 Dec 2021 07:47:37 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 06 Dec 2021 07:47:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=JMll3rPulbdm3X1Pv3G5tXQ4t6FzUJXqGr0iV+1OD vc=; b=fcGZa2kpdxJM6GGLFPC7HrchE5RutXg9oxojvu1IFD6FnReK/LIrq9pRH lM1PujdST0kHGCPxX31XnRJLlV7HULq8TsVzxOM8dIBOA/gWw/EbPZmP7+VbiAi1 QwypxflSy3beUTRlY32lVdMYNrrliDQPUoyp2NAteddo4y4VDPOhiuv1ePZbBB1k K7DC5coedZlxWQ5JIfyFoz4DEY5j7WRlAPT3KLvrhivXgQsriq3pngPCcxaCq2Cc HWG3F3DytaGmRZibpL88M/rBXT2TK1kL18YcW5NqSPxnGNX+E13EmO9hNxCfbLlo Sf+L/rCVNCshxIRx4EzXa7LWRFTWw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrjeefgdeggecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrh hprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeefjeegheetuefhveevudel ueeftdejteeiffetvdduhfdtieefgfeutedtveeggfenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghuthes vghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 Dec 2021 07:47:36 -0500 (EST) Message-ID: Date: Mon, 6 Dec 2021 13:47:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: Fix inappropriate uses of PG_GETARG_UINT32() Content-Language: en-US To: "Bossart, Nathan" , pgsql-hackers References: <7e43869b-d412-8f81-30a3-809783edc9a3@enterprisedb.com> <0F72983B-C1CC-4443-AC75-F3BFFA43A45B@amazon.com> From: Peter Eisentraut In-Reply-To: <0F72983B-C1CC-4443-AC75-F3BFFA43A45B@amazon.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 01.12.21 22:59, Bossart, Nathan wrote: > On 12/1/21, 10:29 AM, "Peter Eisentraut" wrote: >> The attached patch fixes this by accepting the argument using >> PG_GETARG_INT32(), doing some checks, and then casting it to unsigned >> for the rest of the code. >> >> The patch also fixes another inappropriate use in an example in the >> documentation. These two were the only inappropriate uses I found, >> after we had fixed a few recently. > > LGTM committed