diff options
author | vva@eagle.mysql.r18.ru <> | 2003-06-05 16:19:54 -0400 |
---|---|---|
committer | vva@eagle.mysql.r18.ru <> | 2003-06-05 16:19:54 -0400 |
commit | 27cbc507faa302e09ad106eb0967e11318f876a4 (patch) | |
tree | d0ab433fd7050c93023ecad3c376e66b8bb32313 /sql/sql_help.cc | |
parent | 94b570daf93528798e84f2544bfef353fa53257c (diff) | |
download | mariadb-git-27cbc507faa302e09ad106eb0967e11318f876a4.tar.gz |
fixed bug (writting outside mallocced buffer in sql_help.cc)
Diffstat (limited to 'sql/sql_help.cc')
-rw-r--r-- | sql/sql_help.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_help.cc b/sql/sql_help.cc index 9003d4b36cd..ba7c08ff15f 100644 --- a/sql/sql_help.cc +++ b/sql/sql_help.cc @@ -553,14 +553,14 @@ int send_variant_2_list(MEM_ROOT *mem_root, Protocol *protocol, String **pointers= (String**)alloc_root(mem_root, sizeof(String*)*names->elements); - String **pos= pointers; + String **pos; + String **end= pointers + names->elements; List_iterator<String> it(*names); - while ((*pos++= it++)); + for ( pos= pointers; pos!=end; (*pos++= it++)); qsort(pointers,names->elements,sizeof(String*),string_ptr_cmp); - String **end= pointers + names->elements; for (pos= pointers; pos!=end; pos++) { protocol->prepare_for_resend(); |