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 1ob0HC-0003Yb-Nc for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Sep 2022 14:00:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ob0HB-0001iW-JR for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Sep 2022 14:00:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ob0HA-0001iN-Eb for pgsql-hackers@lists.postgresql.org; Wed, 21 Sep 2022 14:00:33 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ob0H2-0002ZG-9r for pgsql-hackers@postgresql.org; Wed, 21 Sep 2022 14:00:31 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 362D95C0170; Wed, 21 Sep 2022 10:00:23 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 21 Sep 2022 10:00:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1663768823; x= 1663855223; bh=++PUCBogokiPs6ct9UcjKjZQIbSb8Sb9inTdrSiKgRY=; b=1 PU1nxm/rBcBu/XHN39xXy9/J4nXjyUIICEoWNsAYIyMSiP7fzKQ/jVkcnjZeoW8J BC2jnMexx2oUGGxgMBY+jI0k3uvOLV+EzkoOdNAZdbNDsKeCQEJJHikjOnfqF/Kh 3vt0tFFGBWnY/ht5EaPPe4j+bbqCqIr+b21iQqNoRIpCNunEJqqsEHAwpdRg1E3e PrrE9oEyIjIkRM6/yyEMcCgeOAoEnpBpRE0SKW8dGsyqpWgAwzBent0VHAmis48a FbNEnBenJ1PLw8XEGHFD0RfBmNphx8njJmwvVl0usjzIosTvZtIzv8lTzAF17e3+ W6R1Sm4w0v/gvjQ5/hWog== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeefuddgjedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehleffgeegudejteei hfelteduvdeifffhffdvjedvffegjeekudeludehudeifeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghu thesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 21 Sep 2022 10:00:21 -0400 (EDT) Message-ID: Date: Wed, 21 Sep 2022 10:00:20 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: Tighten pg_get_object_address argument checking Content-Language: en-US To: Amit Kapila Cc: pgsql-hackers References: From: Peter Eisentraut In-Reply-To: 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 21.09.22 12:01, Amit Kapila wrote: > On Tue, Sep 20, 2022 at 11:14 PM Peter Eisentraut > wrote: >> >> For publication schemas (OBJECT_PUBLICATION_NAMESPACE) and user >> mappings (OBJECT_USER_MAPPING), pg_get_object_address() checked the >> array length of the second argument, but not of the first argument. >> If the first argument was too long, it would just silently ignore >> everything but the first argument. Fix that by checking the length of >> the first argument as well. > > LGTM. Committed, thanks for checking.