pgsql: Fix incorrect pointer increment in pgtypes_defmt_scan()

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix incorrect pointer increment in pgtypes_defmt_scan()
Date: 2026-11-19 10:37:02
Message-ID: E1xTzVl-00000000MyX-3mwB@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)ntt(at)gmail(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2026-11-19 11:43:37 pgsql: Avoid rescanning prefixes when choosing a dollar-quote delimiter
Previous Message Daniel Gustafsson 2026-11-19 09:16:20 pgsql: Improve error message for to lrage LO read requests