snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 8c9195694781f35c70bd48739da9c7f44604e5b5
parent fafdbbf815ea44ca1813a4ab58547d487f6a3bfb
Author: default <nobody@localhost>
Date:   Mon,  5 Jun 2023 18:36:36 +0200

Replace an sprintf() with an snprintf().

Diffstat:
Mhttpd.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/httpd.c b/httpd.c @@ -510,7 +510,7 @@ void httpd(void) /* initialize the job control engine */ pthread_mutex_init(&job_mutex, NULL); - sprintf(sem_name, "/job_%d", getpid()); + snprintf(sem_name, sizeof(sem_name), "/job_%d", getpid()); job_sem = sem_open(sem_name, O_CREAT, 0644, 0); if (job_sem == NULL) {