From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix incorrect pointer increment in pgtypes_defmt_scan()
Date: Thu, 19 Nov 2026 10:37:02 +0000
Message-ID: <E1xTzVl-00000000MyX-3mwB@gemulon.postgresql.org> (raw)
Fix incorrect pointer increment in pgtypes_defmt_scan()
The function incorrectly increments pstr instead of *pstr when
skipping leading spaces. This bug has remained hidden because the
caller already skips leading spaces. There are more redundant
leading-space skipping loops in the function and in find_end_token(),
but I didn't try to clean those up, this commit just fixes the clear
latent bug.
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://www.postgresql.org/message-id/20261119.162206.639378539262920864.horikyota.ntt@gmail.com
Backpatch-through: 15
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/0c806e75dabcac1f97bc4aca1d6bba3c58f26b6d
Modified Files
--------------
src/interfaces/ecpg/pgtypeslib/dt_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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: heikki.linnakangas@iki.fi
Subject: Re: pgsql: Fix incorrect pointer increment in pgtypes_defmt_scan()
In-Reply-To: <E1xTzVl-00000000MyX-3mwB@gemulon.postgresql.org>
References: <E1xTzVl-00000000MyX-3mwB@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