From e147dbbc7daddc0fb74a8d9be7cba13f58c86825 Mon Sep 17 00:00:00 2001 From: Mark Seminatore Date: Fri, 23 Jun 2023 16:35:32 -0700 Subject: [PATCH] fix #4101, bounds issue in goto_set_num_threads on Windows --- CONTRIBUTORS.md | 4 ++++ driver/others/blas_server_win32.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 71df13634..1cdbf2daf 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -216,3 +216,7 @@ In chronological order: * Pablo Romero * [2022-08] Fix building from sources for QNX + +* Mark Seminatore + * [2023] Fix bounds issue in goto_set_num_threads + \ No newline at end of file diff --git a/driver/others/blas_server_win32.c b/driver/others/blas_server_win32.c index afa33cccc..c5981a60e 100644 --- a/driver/others/blas_server_win32.c +++ b/driver/others/blas_server_win32.c @@ -568,7 +568,7 @@ void goto_set_num_threads(int num_threads) blas_server_avail = 1; } - for(i = blas_num_threads - 1; i < num_threads - 1; i++){ + for(i = blas_num_threads; i < num_threads - 1; i++){ blas_threads[i] = CreateThread(NULL, 0, blas_thread_server, (void *)i,