Zap another buffer overflow, this time in the parser.

MFC after:	2 weeks
This commit is contained in:
tjr 2002-11-01 12:09:05 +00:00
parent b351ca8597
commit d46cc38f4f

View File

@ -191,6 +191,8 @@ copystr(void)
char *cp = buf;
for (;;) {
if (cp == buf + sizeof(buf) - 2)
errx(1, "message too long");
c = getchar();
if (c == EOF)
break;