diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/expect/expect/0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch | 55 | ||||
-rw-r--r-- | meta/recipes-devtools/expect/expect_5.45.4.bb | 1 |
2 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-devtools/expect/expect/0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch b/meta/recipes-devtools/expect/expect/0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch new file mode 100644 index 0000000000..37512fb9bc --- /dev/null +++ b/meta/recipes-devtools/expect/expect/0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | From 1407fcad6f1dac0a4efe8041660bf6139c1cd16a Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Tue, 24 Sep 2019 13:40:10 +0800 | ||
4 | Subject: [PATCH] exp_main_sub.c: Use PATH_MAX for path | ||
5 | |||
6 | If expect was built from a long path whose length > 200, then it couldn't run: | ||
7 | $ expect -c 'puts yes' | ||
8 | *** buffer overflow detected ***: expect terminated | ||
9 | Aborted (core dumped) | ||
10 | |||
11 | Use PATH_MAX to fix the problem. | ||
12 | |||
13 | Upstream-Status: Pending [Upstream seems dead] | ||
14 | |||
15 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
16 | --- | ||
17 | exp_main_sub.c | 8 ++++++-- | ||
18 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/exp_main_sub.c b/exp_main_sub.c | ||
21 | index fcfaa6e..bf6c4be 100644 | ||
22 | --- a/exp_main_sub.c | ||
23 | +++ b/exp_main_sub.c | ||
24 | @@ -48,6 +48,10 @@ char exp_version[] = PACKAGE_VERSION; | ||
25 | #define NEED_TCL_MAJOR 7 | ||
26 | #define NEED_TCL_MINOR 5 | ||
27 | |||
28 | +#ifndef PATH_MAX | ||
29 | +#define PATH_MAX 4096 | ||
30 | +#endif | ||
31 | + | ||
32 | char *exp_argv0 = "this program"; /* default program name */ | ||
33 | void (*exp_app_exit)() = 0; | ||
34 | void (*exp_event_exit)() = 0; | ||
35 | @@ -901,7 +905,7 @@ int sys_rc; | ||
36 | int rc; | ||
37 | |||
38 | if (sys_rc) { | ||
39 | - char file[200]; | ||
40 | + char file[PATH_MAX]; | ||
41 | int fd; | ||
42 | |||
43 | sprintf(file,"%s/expect.rc",SCRIPTDIR); | ||
44 | @@ -917,7 +921,7 @@ int sys_rc; | ||
45 | } | ||
46 | } | ||
47 | if (my_rc) { | ||
48 | - char file[200]; | ||
49 | + char file[PATH_MAX]; | ||
50 | char *home; | ||
51 | int fd; | ||
52 | char *getenv(); | ||
53 | -- | ||
54 | 2.7.4 | ||
55 | |||
diff --git a/meta/recipes-devtools/expect/expect_5.45.4.bb b/meta/recipes-devtools/expect/expect_5.45.4.bb index 5f59083ad2..39ae6151f6 100644 --- a/meta/recipes-devtools/expect/expect_5.45.4.bb +++ b/meta/recipes-devtools/expect/expect_5.45.4.bb | |||
@@ -25,6 +25,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \ | |||
25 | file://0001-expect-install-scripts-without-using-the-fixline1-tc.patch \ | 25 | file://0001-expect-install-scripts-without-using-the-fixline1-tc.patch \ |
26 | file://0001-Resolve-string-formatting-issues.patch \ | 26 | file://0001-Resolve-string-formatting-issues.patch \ |
27 | file://0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch \ | 27 | file://0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch \ |
28 | file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \ | ||
28 | " | 29 | " |
29 | SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2" | 30 | SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2" |
30 | SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34" | 31 | SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34" |