summaryrefslogtreecommitdiff
path: root/src/libs6rc
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-12-07 14:26:13 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-12-07 14:26:13 +0000
commit7401aa6afef2f64ef127484912f6fdf143cb5588 (patch)
tree664d76581c774f70898a0ec5ab120eaf8fd1f65a /src/libs6rc
parent85e2821400dafd4afc4b75da331d2fd2129c5238 (diff)
downloads6-rc-7401aa6afef2f64ef127484912f6fdf143cb5588.tar.xz
Fix off-by-one in s6rc_livedir_create
Diffstat (limited to 'src/libs6rc')
-rw-r--r--src/libs6rc/s6rc_livedir_create.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs6rc/s6rc_livedir_create.c b/src/libs6rc/s6rc_livedir_create.c
index 1da0ac3..868eca9 100644
--- a/src/libs6rc/s6rc_livedir_create.c
+++ b/src/libs6rc/s6rc_livedir_create.c
@@ -19,7 +19,7 @@ int s6rc_livedir_create (stralloc *sa, char const *live, char const *suffix, cha
if (!stralloc_cats(sa, suffix)) goto err ;
if (!stralloc_cats(sa, ":XXXXXX")) goto err ;
if (!mkdtemp(sa->s + sabase)) goto err ;
- newlen = sa->len-- ;
+ newlen = sa->len ;
if (chmod(sa->s + sabase, 0755) < 0) goto delerr ;
if (!stralloc_catb(sa, "/servicedirs", 13)) goto delerr ; /* allocates enough for the next strcpys */
if (mkdir(sa->s + sabase, 0755) < 0) goto delerr ;