summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-11-04 08:03:05 +0000
committerderaadt <deraadt@openbsd.org>1997-11-04 08:03:05 +0000
commit0830ca0d85f230058ed8cce1b8976fb35a86e278 (patch)
treeb590c67a49122eba99c5a2547bb81d4a3c0706eb
parentadd more emulations; problem noted by khym@bga.com (diff)
downloadwireguard-openbsd-0830ca0d85f230058ed8cce1b8976fb35a86e278.tar.xz
wireguard-openbsd-0830ca0d85f230058ed8cce1b8976fb35a86e278.zip
buffer overrun; shigio@wafu.netgate.net
-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