summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-09-07 17:02:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-09-07 17:02:24 +0000
commit1aef1ebaacaa06856436b47ba78a6c0dead132a1 (patch)
tree5c9e5af520a9bd093de58d9a20aa66ac709bdf0e
parent07e3237c8a882efb017ff0c24234ce058f452c60 (diff)
off by one overflow
-rw-r--r--libexec/getty/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/getty/main.c b/libexec/getty/main.c
index 8a2439fa75f..e4e43bcaaf4 100644
--- a/libexec/getty/main.c
+++ b/libexec/getty/main.c
@@ -39,7 +39,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";*/
-static char rcsid[] = "$Id: main.c,v 1.14 1999/12/09 20:20:43 deraadt Exp $";
+static char rcsid[] = "$Id: main.c,v 1.15 2000/09/07 17:02:23 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -416,7 +416,7 @@ getname()
if (c == EOT)
exit(1);
- if (c == '\r' || c == '\n' || np >= &name[sizeof name]) {
+ if (c == '\r' || c == '\n' || np >= name + sizeof name -1) {
putf("\r\n");
break;
}