You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
CONC-161: Increase username length to 128
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
#define NAME_LEN 256 /* Field/table name length */
|
||||
#define HOSTNAME_LENGTH 60
|
||||
#define SYSTEM_MB_MAX_CHAR_LENGTH 3
|
||||
#define USERNAME_CHAR_LENGTH 16
|
||||
#define USERNAME_CHAR_LENGTH 128
|
||||
#define USERNAME_LENGTH USERNAME_CHAR_LENGTH * SYSTEM_MB_MAX_CHAR_LENGTH
|
||||
#define SERVER_VERSION_LENGTH 60
|
||||
#define SQLSTATE_LENGTH 5
|
||||
|
@@ -73,7 +73,7 @@ static int native_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
|
||||
return CR_SERVER_HANDSHAKE_ERR;
|
||||
|
||||
/* save it in MYSQL */
|
||||
memcpy(mysql->scramble_buff, pkt, SCRAMBLE_LENGTH);
|
||||
memmove(mysql->scramble_buff, pkt, SCRAMBLE_LENGTH);
|
||||
mysql->scramble_buff[SCRAMBLE_LENGTH] = 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user