1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Extra safety fixes (probably not needed, but can't hurt)

This commit is contained in:
monty@mysql.com
2004-05-15 09:08:03 +03:00
parent 7bcb79e76b
commit 1e860400f3
3 changed files with 6 additions and 9 deletions

View File

@@ -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);
}