diff options
Diffstat (limited to 'src/bin/pg_basebackup/pg_basebackup.c')
-rw-r--r-- | src/bin/pg_basebackup/pg_basebackup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index 3ed6d17dd3b..6eb4e1b8dad 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -508,7 +508,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) FILE *file = NULL; if (PQgetisnull(res, rownum, 0)) - strcpy(current_path, basedir); + strlcpy(current_path, basedir, sizeof(current_path)); else { if (PQgetlength(res, rownum, 1) >= MAXPGPATH) @@ -517,7 +517,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) progname, PQgetvalue(res, rownum, 1)); disconnect_and_exit(1); } - strcpy(current_path, PQgetvalue(res, rownum, 1)); + strlcpy(current_path, PQgetvalue(res, rownum, 1), sizeof(current_path)); } /* |