1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Bug#25141 Crash Server on Partitioning command

- The function build_table_filename() builds up a string unconditionally 
using the forward slash as a path separator. Later, when the string is 
searched for FN_LIBCHAR by the set_up_table_before_create() function, a 
null pointer is returned that is finally used by strlen in the 
append_file_to_dir() function which causes the crash.
This commit is contained in:
iggy@recycle.(none)
2007-04-23 13:50:34 -04:00
parent 9f4df9b91d
commit 2a54abd582
7 changed files with 172 additions and 84 deletions

View File

@@ -182,8 +182,8 @@ uint build_table_filename(char *buff, size_t bufflen, const char *db,
VOID(tablename_to_filename(table_name, tbbuff, sizeof(tbbuff)));
VOID(tablename_to_filename(db, dbbuff, sizeof(dbbuff)));
length= strxnmov(buff, bufflen, mysql_data_home, "/", dbbuff,
"/", tbbuff, ext, NullS) - buff;
length= strxnmov(buff, bufflen, mysql_data_home, FN_ROOTDIR, dbbuff,
FN_ROOTDIR, tbbuff, ext, NullS) - buff;
DBUG_PRINT("exit", ("buff: '%s'", buff));
DBUG_RETURN(length);
}