diff options
author | monty@mysql.com <> | 2004-05-15 09:08:03 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2004-05-15 09:08:03 +0300 |
commit | 1e860400f3a260c01a00bada514df7f34ec462c0 (patch) | |
tree | c06f8d43d8562af60ba084e2156426de344720cc /sql/sql_show.cc | |
parent | 7bcb79e76bad694de07cbc65996325bb3391f679 (diff) | |
download | mariadb-git-1e860400f3a260c01a00bada514df7f34ec462c0.tar.gz |
Extra safety fixes (probably not needed, but can't hurt)
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 7f52e52c849..a4ef735c715 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1147,8 +1147,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) races with query_length */ uint length= min(max_query_length, tmp->query_length); - thd_info->query=(char*) thd->memdup(tmp->query,length+1); - thd_info->query[length]=0; + thd_info->query=(char*) thd->strmake(tmp->query,length); } thread_infos.append(thd_info); } |