summaryrefslogtreecommitdiff
path: root/sql/sql_plugin.cc
diff options
context:
space:
mode:
authorKristofer Pettersson <kristofer.pettersson@sun.com>2009-05-18 10:10:30 +0200
committerKristofer Pettersson <kristofer.pettersson@sun.com>2009-05-18 10:10:30 +0200
commitd7004f0b23ae2b4c3095fdae83bc5a1bdb06b548 (patch)
treec42b20866050f15473e40dfb8cde9fd32cddce30 /sql/sql_plugin.cc
parentbaeac8762396a181440368c9413d617f0f49aacc (diff)
downloadmariadb-git-d7004f0b23ae2b4c3095fdae83bc5a1bdb06b548.tar.gz
Bug#19027 MySQL 5.0 starts even with Fatal InnoDB errors
convert_dash_to_underscore was supplied with a character length containing my byte too many which caused valgrind errors of invalid read.
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 b5c7ceda6ab..da168d36429 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -3314,7 +3314,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
varname= (char*) alloc_root(mem_root, len);
strxmov(varname, tmp->name.str, "-", o->name, NullS);
my_casedn_str(&my_charset_latin1, varname);
- convert_dash_to_underscore(varname, len);
+ convert_dash_to_underscore(varname, len-1);
v= new (mem_root) sys_var_pluginvar(varname, o);
}
DBUG_ASSERT(v); /* check that an object was actually constructed */