diff options
Diffstat (limited to 'src/backend/replication/logical/logical.c')
-rw-r--r-- | src/backend/replication/logical/logical.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/backend/replication/logical/logical.c b/src/backend/replication/logical/logical.c index 939831b5576..30baa45383a 100644 --- a/src/backend/replication/logical/logical.c +++ b/src/backend/replication/logical/logical.c @@ -244,9 +244,7 @@ CreateInitDecodingContext(char *plugin, /* register output plugin name with slot */ SpinLockAcquire(&slot->mutex); - strncpy(NameStr(slot->data.plugin), plugin, - NAMEDATALEN); - NameStr(slot->data.plugin)[NAMEDATALEN - 1] = '\0'; + StrNCpy(NameStr(slot->data.plugin), plugin, NAMEDATALEN); SpinLockRelease(&slot->mutex); /* |