summaryrefslogtreecommitdiff
path: root/httpd.c
diff options
context:
space:
mode:
authorGravatar default2023-06-05 18:36:36 +0200
committerGravatar default2023-06-05 18:36:36 +0200
commit8c9195694781f35c70bd48739da9c7f44604e5b5 (patch)
treef5612b35c4e4e90c9171a39f0e5b8dcc1626a048 /httpd.c
parentReplaced usage of random() with xs_rnd_buf(). (diff)
downloadpenes-snac2-8c9195694781f35c70bd48739da9c7f44604e5b5.tar.gz
penes-snac2-8c9195694781f35c70bd48739da9c7f44604e5b5.tar.xz
penes-snac2-8c9195694781f35c70bd48739da9c7f44604e5b5.zip
Replace an sprintf() with an snprintf().
Diffstat (limited to 'httpd.c')
-rw-r--r--httpd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/httpd.c b/httpd.c
index 9703a1f..4272199 100644
--- a/httpd.c
+++ b/httpd.c
@@ -510,7 +510,7 @@ void httpd(void)
510 510
511 /* initialize the job control engine */ 511 /* initialize the job control engine */
512 pthread_mutex_init(&job_mutex, NULL); 512 pthread_mutex_init(&job_mutex, NULL);
513 sprintf(sem_name, "/job_%d", getpid()); 513 snprintf(sem_name, sizeof(sem_name), "/job_%d", getpid());
514 job_sem = sem_open(sem_name, O_CREAT, 0644, 0); 514 job_sem = sem_open(sem_name, O_CREAT, 0644, 0);
515 515
516 if (job_sem == NULL) { 516 if (job_sem == NULL) {