summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2023-02-26 18:25:31 +0200
committerMonty <monty@mariadb.org>2023-02-26 18:44:18 +0200
commit3b9e8dfa84e8de75cb6d4a06ae174abb543b58aa (patch)
tree631f9b1c2f06645358b899cba80bfb8ac49f3330
parent6f6fa3bec2decb26598bce33d43594aabb25b201 (diff)
downloadmariadb-git-3b9e8dfa84e8de75cb6d4a06ae174abb543b58aa.tar.gz
Fixed (non crtitial) memory segment overrunbb-10.10-monty
This was discovered as part of adding a protected memory area between each area allocated by multi_alloc(). The patch that adds the protection will be pushed in 10.5. This patch adds fixes that are unique for 10.10
-rw-r--r--sql/sql_select.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 97ab25ad011..fa93a11d2fa 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -5312,7 +5312,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
/* Initialize POSITION objects */
for (i=0 ; i <= table_count ; i++)
(void) new ((char*) (join->positions + i)) POSITION;
- for (i=0 ; i <= sort_space ; i++)
+ for (i=0 ; i < sort_space ; i++)
(void) new ((char*) (join->sort_positions + i)) POSITION;
join->best_ref= stat_vector;