summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-07-03 23:00:04 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-07-03 23:00:04 +0000
commitf8f67fa65189cb7be0d5856f80db3e4b9fadbb05 (patch)
treed4ec5bf77e4676d65fe5e97fa90d5f416a9ec8f3
parentb36c6e486f04e4f29a0c88065eb84d0107ceb136 (diff)
downloads6-rc-f8f67fa65189cb7be0d5856f80db3e4b9fadbb05.tar.xz
bugfixes: in s6-rc-compile, off-by-one array size, and uninitialized struct field
-rw-r--r--src/s6-rc/s6-rc-compile.c5
1 files 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)
{