From: Ulrich Landgraf Date: Mon, 15 Aug 2022 15:50:36 +0000 (+0100) Subject: Fix symlink-following. Bug 2909 X-Git-Tag: exim-4.97-RC0~252 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/a1ec98dd963767551514cae86c7af56c6aa3f36e Fix symlink-following. Bug 2909 Broken-by: ef57b25bfa --- 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)