Fix a buffer overflow found by Gerardo Puga <gpuga@gioia.ing.unlp.edu.ar>
-Erik
This commit is contained in:
parent
8610f91ebf
commit
0d2d1eb599
@ -416,7 +416,7 @@ static int builtin_read(struct child_prog *child)
|
||||
|
||||
if (child->argv[1]) {
|
||||
/* argument (VAR) given: put "VAR=" into buffer */
|
||||
strcpy(string, child->argv[1]);
|
||||
safe_strncpy(string, child->argv[1], MAX_READ-1);
|
||||
len = strlen(string);
|
||||
string[len++] = '=';
|
||||
string[len] = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user