The variable is only being read as a string (char *), so data after the
'\0' can't be leaked.
Cc: Christian Göttsche <cgzones@googlemail.com>
Cc: Serge Hallyn <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
/*@-exitarg@*/
#include "exitcodes.h"
#include "shadowlog.h"
+#include "strlcpy.h"
#ifdef USE_PAM
#include "pam_defs.h"
if (NULL == tmptty) {
tmptty = "UNKNOWN";
}
- STRFCPY (tty, tmptty);
+ STRLCPY(tty, tmptty);
#ifndef USE_PAM
is_console = console (tty);