From f8f67fa65189cb7be0d5856f80db3e4b9fadbb05 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 3 Jul 2017 23:00:04 +0000 Subject: bugfixes: in s6-rc-compile, off-by-one array size, and uninitialized struct field --- src/s6-rc/s6-rc-compile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/s6-rc/s6-rc-compile.c b/src/s6-rc/s6-rc-compile.c index 93c8713..dbf1f67 100644 --- a/src/s6-rc/s6-rc-compile.c +++ b/src/s6-rc/s6-rc-compile.c @@ -234,7 +234,8 @@ static unsigned int add_internal_longrun (before_t *be, char const *name) .timeout = { 0, 0 } }, .srcdir = 0, - .pipeline = { 0, 0 } + .pipeline = { 0, 0 }, + .pipelinename = 0 } ; add_name_nocheck(be, S6RC_INTERNALS, name, SVTYPE_LONGRUN, &pos, &service.common.kname) ; if (!genalloc_append(longrun_t, &be->longruns, &service)) dienomem() ; @@ -914,7 +915,7 @@ static inline void write_oneshot_runner (char const *compiled, uid_t const *uids { size_t base = satmp.len ; size_t i ; - char fn[34 + sizeof(S6RC_ONESHOT_RUNNER)] = "servicedirs/" S6RC_ONESHOT_RUNNER "/data/rules/gid/" ; + char fn[35 + sizeof(S6RC_ONESHOT_RUNNER)] = "servicedirs/" S6RC_ONESHOT_RUNNER "/data/rules/gid/" ; make_skel(compiled, S6RC_ONESHOT_RUNNER, uids, uidn, gids, gidn, 3) ; if (gidn) { -- cgit v1.2.3