pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Bossart, Nathan <bossartn@amazon.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Fix inappropriate uses of PG_GETARG_UINT32()
Date: Mon, 6 Dec 2021 13:47:35 +0100
Message-ID: <fca84885-8fa0-9bb3-3e44-068772c81a91@enterprisedb.com> (raw)
In-Reply-To: <0F72983B-C1CC-4443-AC75-F3BFFA43A45B@amazon.com>
References: <7e43869b-d412-8f81-30a3-809783edc9a3@enterprisedb.com>
	<0F72983B-C1CC-4443-AC75-F3BFFA43A45B@amazon.com>

On 01.12.21 22:59, Bossart, Nathan wrote:
> On 12/1/21, 10:29 AM, "Peter Eisentraut" <peter.eisentraut@enterprisedb.com> 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





view thread (3+ messages)

Message-ID: <fca84885-8fa0-9bb3-3e44-068772c81a91@enterprisedb.com>
Permalink:  ../fca84885-8fa0-9bb3-3e44-068772c81a91@enterprisedb.com/
Also on:    postgresql.org/message-id/fca84885-8fa0-9bb3-3e44-068772c81a91@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@enterprisedb.com, bossartn@amazon.com
  Subject: Re: Fix inappropriate uses of PG_GETARG_UINT32()
  In-Reply-To: <fca84885-8fa0-9bb3-3e44-068772c81a91@enterprisedb.com>
  References: <7e43869b-d412-8f81-30a3-809783edc9a3@enterprisedb.com> <0F72983B-C1CC-4443-AC75-F3BFFA43A45B@amazon.com> <fca84885-8fa0-9bb3-3e44-068772c81a91@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox