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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user