mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-22 07:42:11 +08:00
Fix potential crash bug when pasting large amounts of text into the shell
darcs-hash:20070107140410-ac50b-c7b680b05f3aaf7f10e6e06a0fdc232d30c3e1b1.gz
This commit is contained in:
parent
3b4bacb5ba
commit
3fbd8036f4
2
reader.c
2
reader.c
@ -693,7 +693,7 @@ static int insert_str(wchar_t *str)
|
|||||||
{
|
{
|
||||||
memmove( &data->buff[data->buff_pos+len],
|
memmove( &data->buff[data->buff_pos+len],
|
||||||
&data->buff[data->buff_pos],
|
&data->buff[data->buff_pos],
|
||||||
sizeof(wchar_t)*(data->buff_len-data->buff_pos) );
|
sizeof(wchar_t)*(old_len-data->buff_pos) );
|
||||||
}
|
}
|
||||||
memmove( &data->buff[data->buff_pos], str, sizeof(wchar_t)*len );
|
memmove( &data->buff[data->buff_pos], str, sizeof(wchar_t)*len );
|
||||||
data->buff_pos += len;
|
data->buff_pos += len;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user