The variables are only being read as strings (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"
/*
* Global variables
(unsigned long) caller_uid));
su_failure (caller_tty, true); /* unknown target UID*/
}
- STRFCPY (caller_name, pw->pw_name);
+ STRLCPY(caller_name, pw->pw_name);
#ifndef USE_PAM
#ifdef SU_ACCESS
}
if (optind < argc) {
- STRFCPY (name, argv[optind++]); /* use this login id */
+ STRLCPY(name, argv[optind++]); /* use this login id */
}
if ('\0' == name[0]) { /* use default user */
struct passwd *root_pw = getpwnam ("root");