Zap another buffer overflow, this time in the parser.
MFC after: 2 weeks
This commit is contained in:
parent
b351ca8597
commit
d46cc38f4f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user