summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox
diff options
context:
space:
mode:
authorMing Liu <ming.liu@windriver.com>2014-01-09 17:57:07 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-10 15:16:50 +0000
commit7be3064bf565b308dec80254da2964883be5f1b1 (patch)
tree519dec84561a51c968e465d10378580e55e39a65 /meta/recipes-core/busybox
parentb4f7995e9a7f6f5ce54297ff0ab9b81d6bbbff40 (diff)
downloadpoky-7be3064bf565b308dec80254da2964883be5f1b1.tar.gz
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. (From OE-Core rev: 21ba0297409bfc6e0fb89f45c9bfed8981c7df5b) Signed-off-by: Ming Liu <ming.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/busybox')
-rw-r--r--meta/recipes-core/busybox/busybox/busybox-lineedit-initialize-delptr.patch23
-rw-r--r--meta/recipes-core/busybox/busybox_1.21.1.bb1
2 files changed, 24 insertions, 0 deletions
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 0000000000..e59211bd5d
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/busybox-lineedit-initialize-delptr.patch
@@ -0,0 +1,23 @@
1Derived from:
2http://git.busybox.net/busybox/commit/?id=46031da862a60422f80050a905cea0b67026b021.
3
4In vi mode, the 'p' and 'P' commands caused a segfault when nothing had
5been put in the buffer yet because the delptr was not initialized.
6
7Upstream-Status: Backport
8
9Signed-off-by: Shawn J. Goff <shawn7400@gmail.com>
10Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
11Signed-off-by: Ming Liu <ming.liu@windriver.com>
12
13diff -urpN a/libbb/lineedit.c b/libbb/lineedit.c
14--- a/libbb/lineedit.c
15+++ b/libbb/lineedit.c
16@@ -187,6 +187,7 @@ extern struct lineedit_statics *const li
17 cmdedit_termw = 80; \
18 IF_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines = 1;) \
19 IF_USERNAME_OR_HOMEDIR(home_pwd_buf = (char*)null_str;) \
20+ IF_FEATURE_EDITING_VI(delptr = delbuf;) \
21 } while (0)
22
23 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 267604afa3..cf59f58e76 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 \
35 file://busybox-list-suid-and-non-suid-app-configs.patch \ 35 file://busybox-list-suid-and-non-suid-app-configs.patch \
36 file://busybox-sed-fix-sed-clusternewline-testcase.patch \ 36 file://busybox-sed-fix-sed-clusternewline-testcase.patch \
37 file://find-get-rid-of-nested-functions.patch \ 37 file://find-get-rid-of-nested-functions.patch \
38 file://busybox-lineedit-initialize-delptr.patch \
38" 39"
39 40
40SRC_URI[tarball.md5sum] = "795394f83903b5eec6567d51eebb417e" 41SRC_URI[tarball.md5sum] = "795394f83903b5eec6567d51eebb417e"