summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-11-04 08:03:06 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-11-04 08:03:06 +0000
commitae461759b712418561716082f5e2342956af8bf6 (patch)
tree7b596cbcd666e779cd453424fb29150dcb389272 /usr.bin
parent169aa50f07c5e978e841cfa91dce18461e0bc4f5 (diff)
buffer overrun; shigio@wafu.netgate.net
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ctags/print.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ctags/print.c b/usr.bin/ctags/print.c
index 2a35bd58927..4950611382a 100644
--- a/usr.bin/ctags/print.c
+++ b/usr.bin/ctags/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.2 1996/06/26 05:32:30 deraadt Exp $ */
+/* $OpenBSD: print.c,v 1.3 1997/11/04 08:03:05 deraadt Exp $ */
/* $NetBSD: print.c,v 1.4 1995/09/27 01:06:58 jtc Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: print.c,v 1.2 1996/06/26 05:32:30 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: print.c,v 1.3 1997/11/04 08:03:05 deraadt Exp $";
#endif
#endif /* not lint */
@@ -66,7 +66,7 @@ getline()
saveftell = ftell(inf);
(void)fseek(inf, lineftell, SEEK_SET);
if (xflag)
- for (cp = lbuf; GETC(!=, '\n'); *cp++ = c)
+ for (cp = lbuf; GETC(!=, EOF) && c != '\n'; *cp++ = c)
continue;
/*
* do all processing here, so we don't step through the