diff options
author | Karel Zak | 2006-12-07 00:25:46 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:25:46 +0100 |
commit | c07ebfa1e02d208ab12430e6791ea147bcfaf9c0 (patch) | |
tree | d44a755098286f5d553c7aea1a73d98c2995d6ec /login-utils/chfn.c | |
parent | Imported from util-linux-2.10s tarball. (diff) | |
download | kernel-qcow2-util-linux-c07ebfa1e02d208ab12430e6791ea147bcfaf9c0.tar.gz kernel-qcow2-util-linux-c07ebfa1e02d208ab12430e6791ea147bcfaf9c0.tar.xz kernel-qcow2-util-linux-c07ebfa1e02d208ab12430e6791ea147bcfaf9c0.zip |
Imported from util-linux-2.11b tarball.
Diffstat (limited to 'login-utils/chfn.c')
-rw-r--r-- | login-utils/chfn.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/login-utils/chfn.c b/login-utils/chfn.c index de228241b..e25212e88 100644 --- a/login-utils/chfn.c +++ b/login-utils/chfn.c @@ -16,7 +16,7 @@ * Hacked by Peter Breitenlohner, peb@mppmu.mpg.de, * to remove trailing empty fields. Oct 5, 96. * - * 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org> + * 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> * - added Native Language Support * * @@ -36,6 +36,7 @@ #include "my_crypt.h" #include "islocal.h" #include "setpwnam.h" +#include "xstrncpy.h" #include "nls.h" #include "env.h" @@ -239,8 +240,7 @@ static boolean parse_argv (argc, argv, pinfo) info_given = true; status = 0; - strncpy (buf, whoami, sizeof(buf)-128); - buf[sizeof(buf)-128-1] = 0; + xstrncpy (buf, whoami, sizeof(buf)-128); strcat (buf, ": "); /* now store the argument */ |