]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Of course radwho is not threaded, so this was actually fine *sigh*
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 20 Sep 2019 16:29:07 +0000 (11:29 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 20 Sep 2019 16:36:36 +0000 (11:36 -0500)
src/bin/radwho.c

index 308e38ddfa2271119a399958bde18ecab8a6076a..24e768d10a211466fa696821c3fed175286c8010 100644 (file)
@@ -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);