diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2016-03-10 23:09:18 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2016-03-10 23:09:18 +0000 |
commit | fdafe0924a3ae3aaed33b087e3def90135c29e78 (patch) | |
tree | 6c6e38ee94c1957bc2de0201d6b8ed5de18b71bc | |
parent | 48c4828a08476d5eeea20f9a2fa3f866e902914e (diff) | |
download | s6-rc-fdafe0924a3ae3aaed33b087e3def90135c29e78.tar.xz |
s6-rc-init bugfix: don't use satmp.s after cleanup(). For real this time.
-rw-r--r-- | src/s6-rc/s6-rc-init.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) ; } |