commit | 0d2d1eb59983097f95acc4da874e8f5a78c8b1de | [log] [tgz] |
---|---|---|
author | Eric Andersen <andersen@codepoet.org> | Thu Jun 06 13:33:01 2002 +0000 |
committer | Eric Andersen <andersen@codepoet.org> | Thu Jun 06 13:33:01 2002 +0000 |
tree | 1927f1fe812dc9948dc0f561e953eb4e85a47525 | |
parent | 8610f91ebf0adfc117002ae5a95f449b4ab4a2cc [diff] [blame] |
Fix a buffer overflow found by Gerardo Puga <gpuga@gioia.ing.unlp.edu.ar> -Erik
diff --git a/shell/lash.c b/shell/lash.c index 53377d4..1640122 100644 --- a/shell/lash.c +++ b/shell/lash.c
@@ -416,7 +416,7 @@ 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';