diff options
| author | Daniel O'Callaghan <danny@FreeBSD.org> | 1998-05-26 06:39:08 +0000 |
|---|---|---|
| committer | Daniel O'Callaghan <danny@FreeBSD.org> | 1998-05-26 06:39:08 +0000 |
| commit | c6a24f8623fb750a12ba1c152e3ea073b029cb19 (patch) | |
| tree | 61b43bebfe3a94b8ea4ab2dc12ea743c4c1d67ad | |
| parent | 14d8151513f826eee5b9cc43da7d7c2c425c431b (diff) | |
Notes
| -rw-r--r-- | usr.bin/su/su.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index c5ab34e15844..ee4941edef11 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)su.c 8.3 (Berkeley) 4/2/94"; #endif static const char rcsid[] = - "$Id: su.c,v 1.25 1997/10/28 21:20:21 guido Exp $"; + "$Id: su.c,v 1.26 1998/05/25 03:34:52 steve Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -169,6 +169,11 @@ main(argc, argv) break; } + if (strlen(user) > MAXLOGNAME - 1) { + (void)fprintf(stderr, "su: username too long.\n"); + exit(1); + } + if (user == NULL) usage(); |
