diff options
author | pgf <pgf@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-07-19 20:41:06 +0000 |
---|---|---|
committer | pgf <pgf@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-07-19 20:41:06 +0000 |
commit | a6577c1e9aaaa17c31208d44fafb01bbed981fc8 (patch) | |
tree | 3586a7c64eb38933ff8af0912c09f8b8d31267e0 /shell | |
parent | 4060e4e4354244e61d6a2defd0ac5de65b20e6ec (diff) | |
download | busybox-w32-a6577c1e9aaaa17c31208d44fafb01bbed981fc8.tar.gz busybox-w32-a6577c1e9aaaa17c31208d44fafb01bbed981fc8.tar.bz2 busybox-w32-a6577c1e9aaaa17c31208d44fafb01bbed981fc8.zip |
applying:
0000054: Tab completing filenames in ash causes SEGV
Simple tab completion operations cause busybox (ash) to
access illegal addresses.
git-svn-id: svn://busybox.net/trunk/busybox@10861 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-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) | |||
782 | #define QUOT (UCHAR_MAX+1) | 782 | #define QUOT (UCHAR_MAX+1) |
783 | 783 | ||
784 | #define collapse_pos(is, in) { \ | 784 | #define collapse_pos(is, in) { \ |
785 | memcpy(int_buf+(is), int_buf+(in), (BUFSIZ+1-(is)-(in))*sizeof(int)); \ | 785 | memmove(int_buf+(is), int_buf+(in), (BUFSIZ+1-(is)-(in))*sizeof(int)); \ |
786 | memcpy(pos_buf+(is), pos_buf+(in), (BUFSIZ+1-(is)-(in))*sizeof(int)); } | 786 | memmove(pos_buf+(is), pos_buf+(in), (BUFSIZ+1-(is)-(in))*sizeof(int)); } |
787 | 787 | ||
788 | static int find_match(char *matchBuf, int *len_with_quotes) | 788 | static int find_match(char *matchBuf, int *len_with_quotes) |
789 | { | 789 | { |