diff options
author | 2001-10-06 10:52:25 +0000 | |
---|---|---|
committer | 2001-10-06 10:52:25 +0000 | |
commit | 1158a689032cf7df3b8eb3ab30cd6994c56b3686 (patch) | |
tree | e95c25436ebc784b81bfb106c47eb56bc1f72cdc | |
parent | +isp at sbus (diff) | |
download | wireguard-openbsd-1158a689032cf7df3b8eb3ab30cd6994c56b3686.tar.xz wireguard-openbsd-1158a689032cf7df3b8eb3ab30cd6994c56b3686.zip |
This PUTBACK must be protected against EOF. The others are fine.
-rw-r--r-- | usr.bin/m4/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c index 0374cf6f6bb..d9d5503dc26 100644 --- a/usr.bin/m4/main.c +++ b/usr.bin/m4/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.50 2001/09/28 12:05:38 espie Exp $ */ +/* $OpenBSD: main.c,v 1.51 2001/10/06 10:52:25 espie Exp $ */ /* $NetBSD: main.c,v 1.12 1997/02/08 23:54:49 cgd Exp $ */ /*- @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.50 2001/09/28 12:05:38 espie Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.51 2001/10/06 10:52:25 espie Exp $"; #endif #endif /* not lint */ @@ -519,7 +519,8 @@ inspect(c, tp) while ((isalnum(c = gpbc()) || c == '_') && tp < etp) h = (h << 5) + h + (*tp++ = c); - PUTBACK(c); + if (c != EOF) + PUTBACK(c); *tp = EOS; /* token is too long, it won't match anything, but it can still * be output. */ |