From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Convert strncpy to strlcpy
Date: Wed, 30 Apr 2025 21:11:57 +0000
Message-ID: <E1uAEij-000Nol-0v@gemulon.postgresql.org> (raw)
Convert strncpy to strlcpy
We try to avoid using strncpy() due to the ease of which it can
be misused. Convert this callsite to use strlcpy() instead to
match similar codepaths in this file.
Suggested-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/2a796830-de2d-4030-b480-d673f6cc5d94@eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/45e7e8ca9e9382e8f5e51fe0c085ea7f5d408ac8
Modified Files
--------------
src/backend/utils/mmgr/mcxt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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: dgustafsson@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Convert strncpy to strlcpy
In-Reply-To: <E1uAEij-000Nol-0v@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