diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-10-06 22:40:28 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-10-07 08:30:20 +0000 |
commit | 8d1fb47e1d7403f1e6b61c2400399666f51067c2 (patch) | |
tree | 0972a5e4322cea64a651ff1915539e0eb4570cd8 /extra | |
parent | 0f8295d7d5ec3ea1ff2076dc1966e23c5a880f80 (diff) | |
download | mariadb-git-8d1fb47e1d7403f1e6b61c2400399666f51067c2.tar.gz |
MDEV-13798 - fix incorrect alignment of the buffer in incremental backup
This incorrect alignment can later lead to memcpy over buffer boundaries,
and to a crash.
Diffstat (limited to 'extra')
-rw-r--r-- | extra/mariabackup/write_filt.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extra/mariabackup/write_filt.cc b/extra/mariabackup/write_filt.cc index cf7753bf380..97529fb1726 100644 --- a/extra/mariabackup/write_filt.cc +++ b/extra/mariabackup/write_filt.cc @@ -79,7 +79,7 @@ wf_incremental_init(xb_write_filt_ctxt_t *ctxt, char *dst_name, cp->delta_buf_base = static_cast<byte *>(ut_malloc(buf_size)); memset(cp->delta_buf_base, 0, buf_size); cp->delta_buf = static_cast<byte *> - (ut_align(cp->delta_buf_base, UNIV_PAGE_SIZE_MAX)); + (ut_align(cp->delta_buf_base, cursor->page_size)); /* write delta meta info */ snprintf(meta_name, sizeof(meta_name), "%s%s", dst_name, |