]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/logoutd.c: Use STRNCAT() instead of its pattern
authorAlejandro Colomar <alx@kernel.org>
Tue, 21 May 2024 11:58:12 +0000 (13:58 +0200)
committerSerge Hallyn <serge@hallyn.com>
Tue, 2 Jul 2024 02:40:11 +0000 (21:40 -0500)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/logoutd.c

index c63f934dbb2a96b4efa9534ee32514efbc004178..d77f757fb3066b6133b344e6953b708a01e8fb74 100644 (file)
@@ -21,6 +21,7 @@
 #include "prototypes.h"
 #include "shadowlog.h"
 #include "sizeof.h"
+#include "string/strcpy/strncat.h"
 #include "string/strdup/strndupa.h"
 
 
@@ -205,7 +206,7 @@ main(int argc, char **argv)
                                tty_name[0] = '\0';
                        }
 
-                       strncat(tty_name, ut->ut_line, NITEMS(ut->ut_line));
+                       STRNCAT(tty_name, ut->ut_line);
 #ifndef O_NOCTTY
 #define O_NOCTTY 0
 #endif