summaryrefslogtreecommitdiffstats
path: root/lib/pid_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pid_output.c')
-rw-r--r--lib/pid_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pid_output.c b/lib/pid_output.c
index f5f7b1d17..bd1d89a94 100644
--- a/lib/pid_output.c
+++ b/lib/pid_output.c
@@ -65,7 +65,7 @@ pid_t pid_output(const char *path)
exit(1);
}
- sprintf(buf, "%d\n", (int)pid);
+ snprintf(buf, sizeof(buf), "%d\n", (int)pid);
pidsize = strlen(buf);
if ((tmp = write(fd, buf, pidsize)) != (int)pidsize)
flog_err_sys(