From 9a953ed70c4be5bb689c28a2f9fa539148792f61 Mon Sep 17 00:00:00 2001 From: andersen Date: Thu, 6 Jun 2002 13:33:01 +0000 Subject: Fix a buffer overflow found by Gerardo Puga -Erik git-svn-id: svn://busybox.net/trunk/busybox@4869 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- shell/lash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell') 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'; -- cgit v1.2.3-55-g6feb