]> git.ipfire.org Git - thirdparty/postgresql.git/commit
libpq: Fix PQtrace() format for non-printable characters
authorMichael Paquier <michael@paquier.xyz>
Wed, 3 Sep 2025 03:54:29 +0000 (12:54 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 3 Sep 2025 03:54:29 +0000 (12:54 +0900)
commit0fedb3a27d24c5dd977c5eca3b009c8f4ec09f33
treebed3b4a6a125d303d4ac8115fc35b36d354b5f2b
parent24ee8678f3c78dd100d1083e0936a200186c0cf9
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
src/interfaces/libpq/fe-trace.c