From 3b9e8dfa84e8de75cb6d4a06ae174abb543b58aa Mon Sep 17 00:00:00 2001 From: Monty Date: Sun, 26 Feb 2023 18:25:31 +0200 Subject: [PATCH] Fixed (non crtitial) memory segment overrun 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 --- sql/sql_select.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 97ab25ad011ef..fa93a11d2fa25 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -5312,7 +5312,7 @@ make_join_statistics(JOIN *join, 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;