1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fix reference to not initialized memory

Changed handing of priv_host to fix bug in FLUSH PRIVILEGES


libmysqld/lib_sql.cc:
  Changed handing of priv_host to fix bug in FLUSH PRIVILEGES
myisam/mi_rkey.c:
  Fix reference to not initialized memory
sql/sql_acl.cc:
  Changed handing of priv_host to fix bug in FLUSH PRIVILEGES
sql/sql_acl.h:
  Changed handing of priv_host to fix bug in FLUSH PRIVILEGES
sql/sql_class.h:
  Changed handing of priv_host to fix bug in FLUSH PRIVILEGES
sql/sql_parse.cc:
  Changed handing of priv_host to fix bug in FLUSH PRIVILEGES
sql/unireg.h:
  Changed handing of priv_host to fix bug in FLUSH PRIVILEGES
This commit is contained in:
unknown
2003-04-30 10:15:09 +03:00
parent b725fc0b33
commit 6db41f7793
7 changed files with 17 additions and 9 deletions

View File

@@ -493,7 +493,7 @@ static int acl_compare(ACL_ACCESS *a,ACL_ACCESS *b)
ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
const char *password,const char *message,
char **priv_user, char **priv_host,
char **priv_user, char *priv_host,
bool old_ver, USER_RESOURCES *mqh)
{
ulong user_access=NO_ACCESS;
@@ -623,7 +623,10 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
*mqh=acl_user->user_resource;
if (!acl_user->user)
*priv_user=(char*) ""; // Change to anonymous user /* purecov: inspected */
*priv_host=acl_user->host.hostname;
if (acl_user->host.hostname)
strmake(priv_host, acl_user->host.hostname, MAX_HOSTNAME);
else
*priv_host= 0;
break;
}
#ifndef ALLOW_DOWNGRADE_OF_USERS