From 3ea36ba0d3cabd7430cada3eaf3d77eb6ffe099a Mon Sep 17 00:00:00 2001
From: Raymond Knopp <raymond.knopp@eurecom.fr>
Date: Tue, 11 Oct 2022 10:55:19 +0200
Subject: [PATCH] bugfix in use of sizeof in thread-pool.c

---
 common/utils/threadPool/thread-pool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/utils/threadPool/thread-pool.c b/common/utils/threadPool/thread-pool.c
index 75252a9143c..3cd18fab029 100644
--- a/common/utils/threadPool/thread-pool.c
+++ b/common/utils/threadPool/thread-pool.c
@@ -167,9 +167,9 @@ void initFloatingCoresTpool(int nbThreads,tpool_t *pool, bool performanceMeas, c
   if (nbThreads) {
     strcpy(threads,"-1");
     for (int i=1; i < nbThreads; i++)
-      strncat(threads,",-1", sizeof(threads-1));
+      strncat(threads,",-1", sizeof(threads)-1);
   }
-  threads[sizeof(threads-1)]=0;
+  threads[sizeof(threads)-1]=0;
   initNamedTpool(threads, pool, performanceMeas, name);
 }
 
-- 
GitLab