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.
This commit is contained in:
parent
82d4f08186
commit
5b79303b40
@ -3107,8 +3107,8 @@ static dberr_t xb_assign_undo_space_start()
|
||||
name[dirnamelen++] = SRV_PATH_SEPARATOR;
|
||||
}
|
||||
|
||||
ut_snprintf(name + dirnamelen, strlen(name) + strlen("ibdata1"),
|
||||
"%s", "ibdata1");
|
||||
ut_snprintf(name + dirnamelen, (sizeof name) - dirnamelen,
|
||||
"%s", "ibdata1");
|
||||
|
||||
file = os_file_create(innodb_file_data_key, name, OS_FILE_OPEN,
|
||||
OS_FILE_NORMAL, OS_DATA_FILE, &ret, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user