agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: test_saslprep: Fix issue with copy of input bytea
Date: Mon, 13 Apr 2026 00:06:53 +0000
Message-ID: <E1wC4pJ-000i7m-10@gemulon.postgresql.org> (raw)

test_saslprep: Fix issue with copy of input bytea

The data given in input of the function may not be null-terminated,
causing strlcpy() to complain with an invalid read.

Issue spotted using valgrind.

Reported-by: Alexander Lakhin <exclusion@gmail.com>
Discussion: https://postgr.es/m/09df9d75-13e7-45fe-89af-33fe118e797b@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5d35531af1840fdd8debfc1ff657643ddba029ab

Modified Files
--------------
src/test/modules/test_saslprep/test_saslprep.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



Message-ID: <E1wC4pJ-000i7m-10@gemulon.postgresql.org>
Permalink:  ../E1wC4pJ-000i7m-10@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wC4pJ-000i7m-10@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: test_saslprep: Fix issue with copy of input bytea
  In-Reply-To: <E1wC4pJ-000i7m-10@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox