diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-11-06 10:18:51 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-11-06 10:18:51 +0200 |
commit | 8688ef22c21b810e7d5d4732a3f73035eb171879 (patch) | |
tree | cbcea402e9c8039e5752c71e1193985406777f2d /extra/mariabackup | |
parent | d7a2401750bb29dfdb45929a536539b9f17b347f (diff) | |
parent | 4e99e67c4e8a04bd03cb0e7efc2ce0129af60c34 (diff) | |
download | mariadb-git-8688ef22c21b810e7d5d4732a3f73035eb171879.tar.gz |
Merge 10.1 to 10.2
Diffstat (limited to 'extra/mariabackup')
-rw-r--r-- | extra/mariabackup/backup_copy.cc | 2 | ||||
-rw-r--r-- | extra/mariabackup/changed_page_bitmap.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc index 1db5eb16a52..524177d7e33 100644 --- a/extra/mariabackup/backup_copy.cc +++ b/extra/mariabackup/backup_copy.cc @@ -479,7 +479,7 @@ struct datafile_cur_t { { memset(rel_path, 0, sizeof rel_path); if (filename) { - strncpy(abs_path, filename, sizeof abs_path); + strncpy(abs_path, filename, sizeof abs_path - 1); abs_path[(sizeof abs_path) - 1] = 0; } else { abs_path[0] = '\0'; diff --git a/extra/mariabackup/changed_page_bitmap.cc b/extra/mariabackup/changed_page_bitmap.cc index 373af9451f9..9891f711714 100644 --- a/extra/mariabackup/changed_page_bitmap.cc +++ b/extra/mariabackup/changed_page_bitmap.cc @@ -389,7 +389,7 @@ log_online_setup_bitmap_file_range( bitmap_files->files[array_pos].seq_num = file_seq_num; strncpy(bitmap_files->files[array_pos].name, - bitmap_dir_file_info.name, FN_REFLEN); + bitmap_dir_file_info.name, FN_REFLEN - 1); bitmap_files->files[array_pos].name[FN_REFLEN - 1] = '\0'; bitmap_files->files[array_pos].start_lsn |