From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Tighten overflow checks in tidin().
Date: Fri, 04 Mar 2022 01:04:44 +0000
Message-ID: <E1nPwNA-000nj5-1Z@gemulon.postgresql.org> (raw)
Tighten overflow checks in tidin().
This code seems to have been written on the assumption that
"unsigned long" is 32 bits; or at any rate it ignored the
possibility of conversion overflow. Rewrite, borrowing some
logic from oidin().
Discussion: https://postgr.es/m/3441768.1646343914@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f7ea240aa7491b6ed2985bb50888bd432f3341df
Modified Files
--------------
src/backend/utils/adt/tid.c | 28 +++++++++++++++++++++-------
src/test/regress/expected/tid.out | 19 +++++++++++++++++++
src/test/regress/sql/tid.sql | 12 ++++++++++++
3 files changed, 52 insertions(+), 7 deletions(-)
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-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Tighten overflow checks in tidin().
In-Reply-To: <E1nPwNA-000nj5-1Z@gemulon.postgresql.org>
References: <E1nPwNA-000nj5-1Z@gemulon.postgresql.org>
* 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