From 1485d9b438757cf9ad5e6a822e6501568e4dcb44 Mon Sep 17 00:00:00 2001 From: "hf@deer.(none)" <> Date: Fri, 12 Dec 2003 18:27:25 +0400 Subject: [PATCH] Edited fix for #1224. strcpy changed to strmake --- libmysqld/lib_sql.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 03e3c1fee30..91a308ecb21 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -224,7 +224,7 @@ static bool check_user(THD *thd,enum_server_command command, const char *user, send_error(net,ER_OUT_OF_RESOURCES); return 1; } - strcpy(thd->priv_host, LOCAL_HOST); + strmake(thd->priv_host, LOCAL_HOST, sizeof(thd->priv_host)-1); thd->master_access=acl_getroot(thd, thd->host, thd->ip, thd->user, passwd, thd->scramble, &thd->priv_user, thd->priv_host,