Commit 8d1fb47e authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

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.
parent 0f8295d7
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment