From 26cff2c62d859dd5c40aeab96c28847c5b3a743a Mon Sep 17 00:00:00 2001 From: Jeroen Vermeulen Date: Tue, 22 Mar 2016 20:51:04 +0100 Subject: Fix array overrun. Looks like MYOptimization was added as an afterthought but never fully implemented. An array was created to cover all optimization classes except this one, and then the entry for MYOptimization was initialized beyond the end. Since all other code appeared to ignore the entry anyway, I simply removed the poisonous initialization. --- mgizapp/src/mkcls/ProblemTest.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mgizapp/src/mkcls/ProblemTest.cpp b/mgizapp/src/mkcls/ProblemTest.cpp index 8951159..a8bb25a 100644 --- a/mgizapp/src/mkcls/ProblemTest.cpp +++ b/mgizapp/src/mkcls/ProblemTest.cpp @@ -223,7 +223,13 @@ void multiSolveProblem(Problem &problem,int versuche,int maxSeconds) end[GDA_OPT].title = " GDA"; end[RRT_OPT].title = " RRT"; end[TA_OPT].title = " TA"; - end[MY_OPT].title = " MY"; + + /* What's this for? It goes beyond the end of the array, because of the + * order of the TA_OPT/HC_OPT/SA_OPT/... enum values. The code ignores + * this extra field, going only up to MAX_OPT_NR. Looks as if MY_OPT was + * added as an afterthought and never fully implemented. + */ + // end[MY_OPT].title = " MY"; for(i=0; i