From 0d2d1eb59983097f95acc4da874e8f5a78c8b1de Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 6 Jun 2002 13:33:01 +0000 Subject: [PATCH] Fix a buffer overflow found by Gerardo Puga -Erik --- shell/lash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/lash.c b/shell/lash.c index 53377d4ed..16401225e 100644 --- a/shell/lash.c +++ b/shell/lash.c @@ -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';