commit 8c91956

default  ·  2023-06-05 16:36:36 +0000 UTC
parent fafdbbf
Replace an sprintf() with an snprintf().
1 files changed,  +1, -1
+1, -1
1@@ -510,7 +510,7 @@ void httpd(void)
2 
3     /* initialize the job control engine */
4     pthread_mutex_init(&job_mutex, NULL);
5-    sprintf(sem_name, "/job_%d", getpid());
6+    snprintf(sem_name, sizeof(sem_name), "/job_%d", getpid());
7     job_sem = sem_open(sem_name, O_CREAT, 0644, 0);
8 
9     if (job_sem == NULL) {