diff options
author | Shawn J. Goff <shawn7400@gmail.com> | 2013-02-27 18:30:05 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2013-02-27 18:30:05 +0100 |
commit | 46031da862a60422f80050a905cea0b67026b021 (patch) | |
tree | 1967cd3785cdd1808bc1e1d76b07772177d48ef7 /libbb | |
parent | 380c8a0763462692eef8d00df4872a561ff7aa7b (diff) | |
download | busybox-46031da862a60422f80050a905cea0b67026b021.tar.gz |
lineedit: initialize delptr
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.
Signed-off-by: Shawn J. Goff <shawn7400@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/lineedit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index dbe616466..52b49e8a9 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) |