Convert strncpy to strlcpy
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Wed, 30 Apr 2025 21:00:47 +0000 (23:00 +0200)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Wed, 30 Apr 2025 21:00:47 +0000 (23:00 +0200)
commit45e7e8ca9e9382e8f5e51fe0c085ea7f5d408ac8
tree516fc48958e8234ee9830d99d7a112f51431597f
parent2d6745a66b12e980fb12bd06d583a66231b5ed5c
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
src/backend/utils/mmgr/mcxt.c