Fixes to Coverity defects 83027 73421 72714 72671 72646 72642
This commit is contained in:
@ -1329,7 +1329,7 @@ static int gw_change_user(
|
||||
|
||||
/* now get the user, after 4 bytes header and 1 byte command */
|
||||
client_auth_packet += 5;
|
||||
strcpy(username, (char *)client_auth_packet);
|
||||
strncpy(username, (char *)client_auth_packet,MYSQL_USER_MAXLEN+1);
|
||||
client_auth_packet += strlen(username) + 1;
|
||||
|
||||
/* get the auth token len */
|
||||
@ -1350,7 +1350,7 @@ static int gw_change_user(
|
||||
}
|
||||
|
||||
/* get new database name */
|
||||
strcpy(database, (char *)client_auth_packet);
|
||||
strncpy(database, (char *)client_auth_packet,MYSQL_DATABASE_MAXLEN+1);
|
||||
|
||||
/* get character set */
|
||||
if (strlen(database)) {
|
||||
@ -1363,7 +1363,7 @@ static int gw_change_user(
|
||||
memcpy(&backend_protocol->charset, client_auth_packet, sizeof(int));
|
||||
|
||||
/* save current_database name */
|
||||
strcpy(current_database, current_session->db);
|
||||
strncpy(current_database, current_session->db,MYSQL_DATABASE_MAXLEN+1);
|
||||
|
||||
/*
|
||||
* Now clear database name in dcb as we don't do local authentication on db name for change user.
|
||||
|
Reference in New Issue
Block a user