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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: libpq: Fix PQtrace() format for non-printable characters
Date: 2025-09-03 03:55:39
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)unusedvar(dot)com>
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 14

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/701a0bd56aa4c3091c7c92d235ada9ba7161e7e9

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

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2025-09-03 06:42:23 pgsql: Fix use-after-free issue in slot synchronization.
Previous Message Michael Paquier 2025-09-03 03:55:38 pgsql: libpq: Fix PQtrace() format for non-printable characters