← Commit list

0d2d1eb59

Eric Andersen
Eric Andersen
2002-06-06
FAILED Duration: 6s

Subject

Fix a buffer overflow found by Gerardo Puga -Erik

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/lash.c+1 -1
@@ -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';