Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-06-06 17:33:01 +0400
committerEric Andersen <andersen@codepoet.org>2002-06-06 17:33:01 +0400
commit0d2d1eb59983097f95acc4da874e8f5a78c8b1de (patch)
tree1927f1fe812dc9948dc0f561e953eb4e85a47525
parent8610f91ebf0adfc117002ae5a95f449b4ab4a2cc (diff)
Fix a buffer overflow found by Gerardo Puga <gpuga@gioia.ing.unlp.edu.ar>
-Erik
-rw-r--r--shell/lash.c2
1 files changed, 1 insertions, 1 deletions
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';