From fdafe0924a3ae3aaed33b087e3def90135c29e78 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 10 Mar 2016 23:09:18 +0000 Subject: s6-rc-init bugfix: don't use satmp.s after cleanup(). For real this time. --- src/s6-rc/s6-rc-init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/s6-rc/s6-rc-init.c b/src/s6-rc/s6-rc-init.c index e7ef023..98d07e5 100644 --- a/src/s6-rc/s6-rc-init.c +++ b/src/s6-rc/s6-rc-init.c @@ -99,8 +99,10 @@ int main (int argc, char const *const *argv) lfn[llen] = 0 ; if (symlink(satmp.s + dirlen, lfn) < 0) { + char tmp[satmp.len - dirlen] ; + byte_copy(tmp, satmp.len - dirlen, satmp.s + dirlen) ; cleanup() ; - strerr_diefu4sys(111, "symlink ", satmp.s + dirlen, " to ", lfn) ; + strerr_diefu4sys(111, "symlink ", tmp, " to ", lfn) ; } -- cgit v1.2.3