Commit 5b79303b authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-15988 Crash in ./mtr mariabackup.undo_space_id

xb_assign_undo_space_start(): Correctly pass the length of
the buffer, so that the file name will not be truncated.
parent 82d4f081
...@@ -3107,8 +3107,8 @@ static dberr_t xb_assign_undo_space_start() ...@@ -3107,8 +3107,8 @@ static dberr_t xb_assign_undo_space_start()
name[dirnamelen++] = SRV_PATH_SEPARATOR; name[dirnamelen++] = SRV_PATH_SEPARATOR;
} }
ut_snprintf(name + dirnamelen, strlen(name) + strlen("ibdata1"), ut_snprintf(name + dirnamelen, (sizeof name) - dirnamelen,
"%s", "ibdata1"); "%s", "ibdata1");
file = os_file_create(innodb_file_data_key, name, OS_FILE_OPEN, file = os_file_create(innodb_file_data_key, name, OS_FILE_OPEN,
OS_FILE_NORMAL, OS_DATA_FILE, &ret, 0); OS_FILE_NORMAL, OS_DATA_FILE, &ret, 0);
......
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