diff options
author | imp <imp@FreeBSD.org> | 1997-12-24 19:13:23 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1997-12-24 19:13:23 +0000 |
commit | 2dee7f5729696f2bc9609e2926baa107302af2c1 (patch) | |
tree | 08ec52179d282c1b596eed4aba6977eef1e13df6 /libexec/ftpd/skey-stuff.c | |
parent | 604bcde61e03e4ca051aae2c87b0f250a3806280 (diff) | |
download | FreeBSD-src-2dee7f5729696f2bc9609e2926baa107302af2c1.zip FreeBSD-src-2dee7f5729696f2bc9609e2926baa107302af2c1.tar.gz |
Various sprintf -> snprintf fixes.
Minor style fix (strcpy(foo,"") -> *foo = '\0')
Obtained from: OpenBSD(?)
Diffstat (limited to 'libexec/ftpd/skey-stuff.c')
-rw-r--r-- | libexec/ftpd/skey-stuff.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/ftpd/skey-stuff.c b/libexec/ftpd/skey-stuff.c index 97f1650..30faa9e 100644 --- a/libexec/ftpd/skey-stuff.c +++ b/libexec/ftpd/skey-stuff.c @@ -3,7 +3,7 @@ #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: skey-stuff.c,v 1.10 1997/11/21 07:38:43 charnier Exp $"; #endif /* not lint */ #include <stdio.h> @@ -24,8 +24,9 @@ int pwok; /* Display s/key challenge where appropriate. */ + *buf = '\0'; if (pwd == NULL || skeychallenge(&skey, pwd->pw_name, buf)) - sprintf(buf, "Password required for %s.", name); + snprintf(buf, sizeof(buf), "Password required for %s.", name); else if (!pwok) strcat(buf, " (s/key required)"); return (buf); |