ports/sysutils/busybox/files/patch-lineedit-initialize-delptr
Matthias Andree 984291a95a - Add support for concatenated .xz streams
- Fix grep -Fw not respecting -w
- Fix assorted crashes and two macros

These, and the previous CVE fix in _2 were
Obtained from:	http://patch-tracker.debian.org/package/busybox/1:1.20.0-8
2013-03-05 16:10:35 +00:00

25 lines
914 B
Text

commit 46031da862a60422f80050a905cea0b67026b021
Author: Shawn J. Goff <shawn7400@gmail.com>
Date: Wed Feb 27 18:30:05 2013 +0100
Bug-Debian: http://bugs.debian.org/701959
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>
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index dbe6164..52b49e8 100644
--- ./libbb/lineedit.c
+++ ./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)