pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: libpq: Fix PQtrace() format for non-printable characters
Date: Wed, 03 Sep 2025 03:55:39 +0000
Message-ID: <E1uteax-000Fer-16@gemulon.postgresql.org> (raw)

libpq: Fix PQtrace() format for non-printable characters

PQtrace() was generating its output for non-printable characters without
casting the characters printed with unsigned char, leading to some extra
"\xffffff" generated in the output due to the fact that char may be
signed.

Oversights introduced by commit 198b3716dba6, so backpatch down to v14.

Author: Ran Benita <ran@unusedvar.com>
Discussion: https://postgr.es/m/a3383211-4539-459b-9d51-95c736ef08e0@app.fastmail.com
Backpatch-through: 14

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ae53537e218a112676483e50358718d142bcfeb9

Modified Files
--------------
src/interfaces/libpq/fe-trace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1uteax-000Fer-16@gemulon.postgresql.org>
Permalink:  ../E1uteax-000Fer-16@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uteax-000Fer-16@gemulon.postgresql.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: libpq: Fix PQtrace() format for non-printable characters
  In-Reply-To: <E1uteax-000Fer-16@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