diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-01-21 00:25:27 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-01-21 00:25:27 +0000 |
commit | de9b31b3711040e0fe651da338dd89118f4375ce (patch) | |
tree | 368b5e51a6015fade527f451fc0393a53d5bfff1 /usr.sbin/sliplogin | |
parent | 646878fbdd850ccf2eaf85132bede14d4db70ab5 (diff) |
avoid oflow which appears not to matter
Diffstat (limited to 'usr.sbin/sliplogin')
-rw-r--r-- | usr.sbin/sliplogin/sliplogin.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/sliplogin/sliplogin.c b/usr.sbin/sliplogin/sliplogin.c index 0fcc2b5109c..0ee7c46f156 100644 --- a/usr.sbin/sliplogin/sliplogin.c +++ b/usr.sbin/sliplogin/sliplogin.c @@ -39,7 +39,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)sliplogin.c 5.6 (Berkeley) 3/2/91";*/ -static char rcsid[] = "$Id: sliplogin.c,v 1.6 1996/12/15 05:57:20 bitblt Exp $"; +static char rcsid[] = "$Id: sliplogin.c,v 1.7 1998/01/21 00:25:26 deraadt Exp $"; #endif /* not lint */ /* @@ -227,6 +227,8 @@ main(argc, argv) s = getdtablesize(); for (fd = 3 ; fd < s ; fd++) (void) close(fd); + if (strlen(argv[0]) > MAXLOGNAME) + errx(1, "login %s too long", argv[0]); openlog(name, LOG_PID, LOG_DAEMON); uid = getuid(); if (argc > 1) { |