summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-05-15 09:08:03 +0300
committermonty@mysql.com <>2004-05-15 09:08:03 +0300
commit1e860400f3a260c01a00bada514df7f34ec462c0 (patch)
treec06f8d43d8562af60ba084e2156426de344720cc /sql/sql_show.cc
parent7bcb79e76bad694de07cbc65996325bb3391f679 (diff)
downloadmariadb-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.cc3
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);
}