From: Arran Cudbard-Bell Date: Fri, 20 Sep 2019 16:29:07 +0000 (-0500) Subject: Of course radwho is not threaded, so this was actually fine *sigh* X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fef729df6d9e2e7cbb2ddd0580d623a2be971a93;p=thirdparty%2Ffreeradius-server.git Of course radwho is not threaded, so this was actually fine *sigh* --- diff --git a/src/bin/radwho.c b/src/bin/radwho.c index 308e38ddfa2..24e768d10a2 100644 --- a/src/bin/radwho.c +++ b/src/bin/radwho.c @@ -107,7 +107,13 @@ static char const *proto(int id, int porttype) */ static char *dotime(time_t t) { - char *s = ctime(&t); + /* + * man 3 ctime + * The caller must provide the output buffer buf + * (which must be at least 26 characters long) + */ + char buff[26]; + char *s = ctime_r(&t, buff); if (showname) { strlcpy(s + 4, s + 11, 6);