Navigation Menu

Skip to content

Commit

Permalink
MDEV-15988 Crash in ./mtr mariabackup.undo_space_id
Browse files Browse the repository at this point in the history
xb_assign_undo_space_start(): Correctly pass the length of
the buffer, so that the file name will not be truncated.
  • Loading branch information
dr-m committed Apr 24, 2018
1 parent 82d4f08 commit 5b79303
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extra/mariabackup/xtrabackup.cc
Expand Up @@ -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);
Expand Down

0 comments on commit 5b79303

Please sign in to comment.