mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-18350 Using audit plugin with MySQL, mysqld crashes when running COM_INIT_DB against invalid database.
mysql_event_general structure changed in 10.3. the database_length should be size_t now instead of the int.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
|
||||
#define PLUGIN_VERSION 0x104
|
||||
#define PLUGIN_STR_VERSION "1.4.7"
|
||||
#define PLUGIN_STR_VERSION "1.4.8"
|
||||
|
||||
#define _my_thread_var loc_thread_var
|
||||
|
||||
@@ -2260,7 +2260,7 @@ static void auditing_v13(MYSQL_THD thd, unsigned int *ev_v0)
|
||||
}
|
||||
|
||||
|
||||
int get_db_mysql57(MYSQL_THD thd, char **name, int *len)
|
||||
int get_db_mysql57(MYSQL_THD thd, char **name, size_t *len)
|
||||
{
|
||||
int db_off;
|
||||
int db_len_off;
|
||||
@@ -2287,7 +2287,7 @@ int get_db_mysql57(MYSQL_THD thd, char **name, int *len)
|
||||
|
||||
#ifdef __linux__
|
||||
*name= *(char **) (((char *) thd) + db_off);
|
||||
*len= *((int *) (((char*) thd) + db_len_off));
|
||||
*len= *((size_t *) (((char*) thd) + db_len_off));
|
||||
if (*name && (*name)[*len] != 0)
|
||||
return 1;
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user