Another buffer overflow similar to the recent one in mkstr(1).

This commit is contained in:
tjr 2002-11-01 12:48:28 +00:00
parent ff3a30e723
commit 5e6cfbf3a7

View File

@ -231,6 +231,8 @@ yankstr(char **cpp)
static char tmp[] = "b\bt\tr\rn\nf\f\\\\\"\"";
while ((c = *cp++)) {
if (dp == dbuf + sizeof(dbuf) - 3)
errx(1, "message too long");
switch (c) {
case '"':