summaryrefslogtreecommitdiff
path: root/sql/sql_connect.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-17 19:42:34 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-17 19:42:34 +0200
commit07315d36030bd1cbe6acfeb3e8f60c49ba876a10 (patch)
tree9c74de4bb97507ece945576df7073a7a28f07674 /sql/sql_connect.cc
parent4656060f118caba30912cca2557d72fcea307283 (diff)
downloadmariadb-git-07315d36030bd1cbe6acfeb3e8f60c49ba876a10.tar.gz
strmake_buf(X,Y) helper, equivalent to strmake(X,Y,sizeof(X)-1)
with a bit of lame protection against abuse.
Diffstat (limited to 'sql/sql_connect.cc')
-rw-r--r--sql/sql_connect.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc
index 9f6185280cd..7e0b659a3e4 100644
--- a/sql/sql_connect.cc
+++ b/sql/sql_connect.cc
@@ -435,7 +435,7 @@ void init_user_stats(USER_STATS *user_stats,
memcpy(user_stats->user, user, user_length);
user_stats->user[user_length]= 0;
user_stats->user_name_length= user_length;
- strmake(user_stats->priv_user, priv_user, sizeof(user_stats->priv_user)-1);
+ strmake_buf(user_stats->priv_user, priv_user);
user_stats->total_connections= total_connections;
user_stats->concurrent_connections= concurrent_connections;