mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fix for bug #23810: Server crashes on various "show status ..." commands
We access some variable values using casts like *(long *) buff that may cause crashes on some platforms (e.g. solaris 64) if buff is not properly aligned. Fix: align the buffer used.
This commit is contained in:
parent
6ddf4785bb
commit
794100ce7e
@@ -2035,7 +2035,9 @@ static bool show_status_array(THD *thd, const char *wild,
|
||||
const char *prefix, TABLE *table,
|
||||
bool ucase_names)
|
||||
{
|
||||
char buff[SHOW_VAR_FUNC_BUFF_SIZE], *prefix_end;
|
||||
MY_ALIGNED_BYTE_ARRAY(buff_data, SHOW_VAR_FUNC_BUFF_SIZE, long);
|
||||
char * const buff= (char *) &buff_data;
|
||||
char *prefix_end;
|
||||
/* the variable name should not be longer than 64 characters */
|
||||
char name_buffer[64];
|
||||
int len;
|
||||
|
||||
Reference in New Issue
Block a user