diff --git a/checkin_notes b/checkin_notes index ddf1d9a09a..a5b7099fb8 100755 --- a/checkin_notes +++ b/checkin_notes @@ -7264,3 +7264,11 @@ Rom 5 July 2006 clientgui/ AdvancedFrame.cpp BOINCTaskBar.cpp, .h + +David 5 July 2006 + - core client: fix bug where we write past the end of + benchmark_desc array if ncpus increases + (from Don Mullis) + + client/ + cs_benchmark.C diff --git a/client/cs_benchmark.C b/client/cs_benchmark.C index be67c14055..a4b0fb6408 100644 --- a/client/cs_benchmark.C +++ b/client/cs_benchmark.C @@ -192,11 +192,12 @@ void CLIENT_STATE::start_cpu_benchmarks() { remove_benchmark_file(BM_TYPE_INT); cpu_benchmarks_start = dtime(); - if (!benchmark_descs) { - benchmark_descs = (BENCHMARK_DESC*)calloc( - ncpus, sizeof(BENCHMARK_DESC) - ); + if (benchmark_descs) { + free(benchmark_descs); } + benchmark_descs = (BENCHMARK_DESC*)calloc( + ncpus, sizeof(BENCHMARK_DESC) + ); benchmarks_running = true; for (i=0; i