From ba671b34266580d1d0c528032c62ed0ed28023eb Mon Sep 17 00:00:00 2001
From: Mathieu Faverge <mathieu.faverge@inria.fr>
Date: Wed, 29 Mar 2023 21:08:32 +0200
Subject: [PATCH] starpu: limit size in scanf

---
 runtime/starpu/control/runtime_control.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runtime/starpu/control/runtime_control.c b/runtime/starpu/control/runtime_control.c
index d527cd56b..450fecf31 100644
--- a/runtime/starpu/control/runtime_control.c
+++ b/runtime/starpu/control/runtime_control.c
@@ -45,7 +45,7 @@ void chameleon_starpu_parallel_worker_init( starpu_sched_opt_t *sched_opt )
         char level[256];
 
         int argc  = strchr( env_pw_level, ':') == NULL ? 1 : 2;
-        int match = sscanf( env_pw_level, "%[^:]:%d", level, &pw_level_number );
+        int match = sscanf( env_pw_level, "%255[^:]:%d", level, &pw_level_number );
 
 #if !defined(CHAMELEON_KERNELS_MT)
         chameleon_warning("chameleon_starpu_parallel_worker_init()", "CHAMELEON has been compiled with multi-threaded kernels disabled (-DCHAMELEON_KERNELS_MT=OFF). This won't break the execution, but you may not obtain the performance gain expected. It is recommended to recompile with -DCHAMELEON_KERNELS_MT=ON.\n");
-- 
GitLab