diff options
author | Denis Vlasenko | 2009-03-21 21:51:11 +0000 |
---|---|---|
committer | Denis Vlasenko | 2009-03-21 21:51:11 +0000 |
commit | 786ce17d6d602c471aab3cbd6ea00c854bfe9366 (patch) | |
tree | 9e22e6ea3bb4a0c3faabf79a5f4fc3eab9852b77 /shell | |
parent | ccff0b962ca85acce8502256cf7e78bb1ca2d898 (diff) | |
download | busybox-786ce17d6d602c471aab3cbd6ea00c854bfe9366.zip busybox-786ce17d6d602c471aab3cbd6ea00c854bfe9366.tar.gz |
hush: fix strcpy of potentially overlapping strings
Diffstat (limited to 'shell')
-rw-r--r-- | shell/hush.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/hush.c b/shell/hush.c index bfd487c..2c4704a 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -2801,7 +2801,7 @@ static char *expand_string_to_string(const char *str) if (!list[0] || list[1]) bb_error_msg_and_die("BUG in varexp2"); /* actually, just move string 2*sizeof(char*) bytes back */ - strcpy((char*)list, list[0]); + overlapping_strcpy((char*)list, list[0]); debug_printf_expand("string_to_string='%s'\n", (char*)list); return (char*)list; } @@ -2823,7 +2823,7 @@ static char* expand_strvec_to_string(char **argv) n++; } } - strcpy((char*)list, list[0]); + overlapping_strcpy((char*)list, list[0]); debug_printf_expand("strvec_to_string='%s'\n", (char*)list); return (char*)list; } |