diff options
Diffstat (limited to 'extra/mariabackup/xtrabackup.cc')
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 40539b1e632..b9cb8a8007a 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -2425,7 +2425,8 @@ xtrabackup_copy_datafile(fil_node_t* node, uint thread_n) goto error; } - strncpy(dst_name, cursor.rel_path, sizeof(dst_name)); + strncpy(dst_name, cursor.rel_path, sizeof dst_name - 1); + dst_name[sizeof dst_name - 1] = '\0'; /* Setup the page write filter */ if (xtrabackup_incremental) { |