[oe-commits] Ming Liu : busybox: lineedit: initialize delptr

git at git.openembedded.org git at git.openembedded.org
Fri Jan 10 15:20:19 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 21ba0297409bfc6e0fb89f45c9bfed8981c7df5b
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=21ba0297409bfc6e0fb89f45c9bfed8981c7df5b

Author: Ming Liu <ming.liu at windriver.com>
Date:   Thu Jan  9 17:57:07 2014 +0800

busybox: 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: Ming Liu <ming.liu at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 .../busybox-lineedit-initialize-delptr.patch       | 23 ++++++++++++++++++++++
 meta/recipes-core/busybox/busybox_1.21.1.bb        |  1 +
 2 files changed, 24 insertions(+)

diff --git a/meta/recipes-core/busybox/busybox/busybox-lineedit-initialize-delptr.patch b/meta/recipes-core/busybox/busybox/busybox-lineedit-initialize-delptr.patch
new file mode 100644
index 0000000..e59211b
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/busybox-lineedit-initialize-delptr.patch
@@ -0,0 +1,23 @@
+Derived from:
+http://git.busybox.net/busybox/commit/?id=46031da862a60422f80050a905cea0b67026b021.
+
+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.
+
+Upstream-Status: Backport
+
+Signed-off-by: Shawn J. Goff <shawn7400 at gmail.com>
+Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
+Signed-off-by: Ming Liu <ming.liu at windriver.com>
+
+diff -urpN a/libbb/lineedit.c b/libbb/lineedit.c
+--- a/libbb/lineedit.c
++++ b/libbb/lineedit.c
+@@ -187,6 +187,7 @@ extern struct lineedit_statics *const li
+ 	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)
diff --git a/meta/recipes-core/busybox/busybox_1.21.1.bb b/meta/recipes-core/busybox/busybox_1.21.1.bb
index 267604a..cf59f58 100644
--- a/meta/recipes-core/busybox/busybox_1.21.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.21.1.bb
@@ -35,6 +35,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://busybox-list-suid-and-non-suid-app-configs.patch \
            file://busybox-sed-fix-sed-clusternewline-testcase.patch \
            file://find-get-rid-of-nested-functions.patch \
+           file://busybox-lineedit-initialize-delptr.patch \
 "
 
 SRC_URI[tarball.md5sum] = "795394f83903b5eec6567d51eebb417e"



More information about the Openembedded-commits mailing list