diff options
author | Ulrich Landgraf <landgraf@physik.uni-freiburg.de> | 2022-08-15 16:50:36 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2022-08-15 16:51:53 +0100 |
commit | a1ec98dd963767551514cae86c7af56c6aa3f36e (patch) | |
tree | a6a8c59cb1dc0763cceba07dea37fb1d8cb3cce3 | |
parent | fd9f0b7354ffc2986f0b2e7b074117feb29b5102 (diff) |
Fix symlink-following. Bug 2909
Broken-by: ef57b25bfa
-rw-r--r-- | src/src/tls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/src/tls.c b/src/src/tls.c index 76e72b5f5..32b29ee3e 100644 --- a/src/src/tls.c +++ b/src/src/tls.c @@ -156,7 +156,7 @@ for (unsigned loop = 20; if (--loop == 0) { errno = ELOOP; return FALSE; } filename = buf[0] == '/' ? string_copyn(buf, (unsigned)len) /* mem released by tls_set_watch */ - : string_sprintf("%.*s/%.*s", (int)(s - filename), (int)len); + : string_sprintf("%.*s/%.*s", (int)(s - filename), filename, (int)len, buf); s = Ustrrchr(filename, '/'); } if (errno != EINVAL) |