diff options
author | Paul Fox <pgf@brightstareng.com> | 2005-07-20 00:41:06 +0400 |
---|---|---|
committer | Paul Fox <pgf@brightstareng.com> | 2005-07-20 00:41:06 +0400 |
commit | 574fee4f99dfe3d5a40f47af1841bf6b66f55b60 (patch) | |
tree | 3586a7c64eb38933ff8af0912c09f8b8d31267e0 | |
parent | b270315b2138701cf101f55f675c9445e5c16ba9 (diff) |
applying:
0000054: Tab completing filenames in ash causes SEGV
Simple tab completion operations cause busybox (ash) to
access illegal addresses.
-rw-r--r-- | shell/cmdedit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/cmdedit.c b/shell/cmdedit.c index 56b789ab6..3380dffe9 100644 --- a/shell/cmdedit.c +++ b/shell/cmdedit.c @@ -782,8 +782,8 @@ static int match_compare(const void *a, const void *b) #define QUOT (UCHAR_MAX+1) #define collapse_pos(is, in) { \ - memcpy(int_buf+(is), int_buf+(in), (BUFSIZ+1-(is)-(in))*sizeof(int)); \ - memcpy(pos_buf+(is), pos_buf+(in), (BUFSIZ+1-(is)-(in))*sizeof(int)); } + memmove(int_buf+(is), int_buf+(in), (BUFSIZ+1-(is)-(in))*sizeof(int)); \ + memmove(pos_buf+(is), pos_buf+(in), (BUFSIZ+1-(is)-(in))*sizeof(int)); } static int find_match(char *matchBuf, int *len_with_quotes) { |