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

This commit is contained in:
Tim J. Robbins 2002-11-01 12:48:28 +00:00
parent c6613efd36
commit cb4cbf9c34
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106296

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 '"':