Fix to bug # 565, http://bugs.mariadb.com/show_bug.cgi?id=565
Client flags are now copied to each backend and used in their connections. log_manager.cc: fixed string allocation where one byte was missing. mysql_client.c: fixed string allocation where one byte was missing.
This commit is contained in:
@ -520,7 +520,7 @@ static char* get_username_from_auth(
|
||||
|
||||
if (ptr == NULL)
|
||||
{
|
||||
if ((rval = (char *)malloc(MYSQL_USER_MAXLEN)) == NULL)
|
||||
if ((rval = (char *)malloc(MYSQL_USER_MAXLEN+1)) == NULL)
|
||||
{
|
||||
goto retblock;
|
||||
}
|
||||
@ -529,7 +529,7 @@ static char* get_username_from_auth(
|
||||
{
|
||||
rval = ptr;
|
||||
}
|
||||
strncpy(rval, first_letter, MYSQL_USER_MAXLEN);
|
||||
snprintf(rval, MYSQL_USER_MAXLEN+1, "%s", first_letter);
|
||||
|
||||
retblock:
|
||||
|
||||
|
Reference in New Issue
Block a user