[PATCH] lineedit: initialize delptr
walter harms
wharms at bfs.de
Tue Feb 19 13:19:02 UTC 2013
works for me,
re,
wh
Am 11.02.2013 18:34, schrieb Shawn J. Goff:
> From: "Shawn J. Goff" <shawn7400 at gmail.com>
>
> In vi mode, the 'p' and 'P' commands caused a segfault when nothing had
> been put in the buffer yet because the delptr was not initialized.
> ---
> libbb/lineedit.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/libbb/lineedit.c b/libbb/lineedit.c
> index dbe6164..52b49e8 100644
> --- a/libbb/lineedit.c
> +++ b/libbb/lineedit.c
> @@ -187,6 +187,7 @@ extern struct lineedit_statics *const lineedit_ptr_to_statics;
> cmdedit_termw = 80; \
> IF_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines = 1;) \
> IF_USERNAME_OR_HOMEDIR(home_pwd_buf = (char*)null_str;) \
> + IF_FEATURE_EDITING_VI(delptr = delbuf;) \
> } while (0)
>
> static void deinit_S(void)
More information about the busybox
mailing list