summaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/indexcmds.c2
-rw-r--r--src/backend/commands/statscmds.c2
-rw-r--r--src/backend/commands/tablecmds.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 2baca12c5f4..7819266a630 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -2246,7 +2246,7 @@ ChooseRelationName(const char *name1, const char *name2,
char modlabel[NAMEDATALEN];
/* try the unmodified label first */
- StrNCpy(modlabel, label, sizeof(modlabel));
+ strlcpy(modlabel, label, sizeof(modlabel));
for (;;)
{
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index 974828545ca..3057d89d50c 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -681,7 +681,7 @@ ChooseExtendedStatisticName(const char *name1, const char *name2,
char modlabel[NAMEDATALEN];
/* try the unmodified label first */
- StrNCpy(modlabel, label, sizeof(modlabel));
+ strlcpy(modlabel, label, sizeof(modlabel));
for (;;)
{
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index ac53f79ada2..cd989c95e51 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -606,7 +606,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
* Truncate relname to appropriate length (probably a waste of time, as
* parser should have done this already).
*/
- StrNCpy(relname, stmt->relation->relname, NAMEDATALEN);
+ strlcpy(relname, stmt->relation->relname, NAMEDATALEN);
/*
* Check consistency of arguments