diff options
Diffstat (limited to 'meta/recipes-core/busybox/busybox/0002-man-fix-segfault-in-man-1.patch')
-rw-r--r-- | meta/recipes-core/busybox/busybox/0002-man-fix-segfault-in-man-1.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox/0002-man-fix-segfault-in-man-1.patch b/meta/recipes-core/busybox/busybox/0002-man-fix-segfault-in-man-1.patch new file mode 100644 index 0000000000..4a930b7b6f --- /dev/null +++ b/meta/recipes-core/busybox/busybox/0002-man-fix-segfault-in-man-1.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 4975cace9bf96bfde174f8bb5cc4068d2ea294d4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Denys Vlasenko <vda.linux@googlemail.com> | ||
3 | Date: Tue, 15 Jun 2021 14:47:46 +0200 | ||
4 | Subject: [PATCH] man: fix segfault in "man 1" | ||
5 | |||
6 | function old new delta | ||
7 | man_main 942 954 +12 | ||
8 | |||
9 | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||
10 | |||
11 | Upstream-Status: Backport [4d4fc5ca5ee4f] | ||
12 | CVE: CVE-2021-42373 | ||
13 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
14 | --- | ||
15 | miscutils/man.c | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/miscutils/man.c b/miscutils/man.c | ||
19 | index 722f6641e..d319e8bba 100644 | ||
20 | --- a/miscutils/man.c | ||
21 | +++ b/miscutils/man.c | ||
22 | @@ -324,7 +324,7 @@ int man_main(int argc UNUSED_PARAM, char **argv) | ||
23 | |||
24 | /* is 1st ARG a SECTION? */ | ||
25 | sec_list = conf_sec_list; | ||
26 | - if (is_section_name(conf_sec_list, *argv)) { | ||
27 | + if (is_section_name(conf_sec_list, *argv) && argv[1]) { | ||
28 | /* yes */ | ||
29 | sec_list = *argv++; | ||
30 | } | ||