diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-06-06 13:33:01 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-06-06 13:33:01 +0000 |
commit | 9a953ed70c4be5bb689c28a2f9fa539148792f61 (patch) | |
tree | 1927f1fe812dc9948dc0f561e953eb4e85a47525 /shell | |
parent | 98613649b4c7fac013aa5f8f69fc24b4f0aac605 (diff) | |
download | busybox-w32-9a953ed70c4be5bb689c28a2f9fa539148792f61.tar.gz busybox-w32-9a953ed70c4be5bb689c28a2f9fa539148792f61.tar.bz2 busybox-w32-9a953ed70c4be5bb689c28a2f9fa539148792f61.zip |
Fix a buffer overflow found by Gerardo Puga <gpuga@gioia.ing.unlp.edu.ar>
-Erik
git-svn-id: svn://busybox.net/trunk/busybox@4869 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r-- | shell/lash.c | 2 |
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) | |||
416 | 416 | ||
417 | if (child->argv[1]) { | 417 | if (child->argv[1]) { |
418 | /* argument (VAR) given: put "VAR=" into buffer */ | 418 | /* argument (VAR) given: put "VAR=" into buffer */ |
419 | strcpy(string, child->argv[1]); | 419 | safe_strncpy(string, child->argv[1], MAX_READ-1); |
420 | len = strlen(string); | 420 | len = strlen(string); |
421 | string[len++] = '='; | 421 | string[len++] = '='; |
422 | string[len] = '\0'; | 422 | string[len] = '\0'; |