Fix GCC 9 string trunction warning

- Increase size of resulting path buffer, unlikely a real problem
- Check return value from snprintf() to detect errors and truncation
- Add logit() function wrapper to initctl, maps to _e()/_d()/_pe()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2020-01-07 01:03:57 +01:00
parent 744719219e
commit 8d271ac5b8
5 changed files with 22 additions and 6 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ char *pid_get_name(pid_t pid, char *name, size_t len)
char *pid_file(svc_t *svc)
{
char fn[MAX_ARG_LEN];
static char path[MAX_ARG_LEN];
static char path[256];
if (svc->pidfile[0]) {
if (svc->pidfile[0] == '!')