summaryrefslogtreecommitdiff
path: root/sql/sql_plugin.cc
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2009-12-18 17:14:09 -0200
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2009-12-18 17:14:09 -0200
commit2887dd45b73e74d0f71ac2fc8641ee7f87237803 (patch)
tree288cf2c60e8e1a6e624239000e9e0e9c87a648b2 /sql/sql_plugin.cc
parent26f1a8ead26e632df20fa03f3a421aa1b37774da (diff)
downloadmariadb-git-2887dd45b73e74d0f71ac2fc8641ee7f87237803.tar.gz
Bug#48983: Bad strmake calls (length one too long)
MySQL 5.1 specific fixes.
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r--sql/sql_plugin.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index bafc601d142..9e35e392d2a 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -2084,7 +2084,7 @@ static int check_func_set(THD *thd, struct st_mysql_sys_var *var,
&error, &error_len, &not_used);
if (error_len)
{
- strmake(buff, error, min(sizeof(buff), error_len));
+ strmake(buff, error, min(sizeof(buff) - 1, error_len));
strvalue= buff;
goto err;
}