readline: bump version to 7.0
[buildroot-gz.git] / package / bash / 0041-patchlevel-41.patch
blobc8ba4b108163daf78b44d55ddd8930a49f2c0a74
1 From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-041
3 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
5 BASH PATCH REPORT
6 =================
8 Bash-Release: 4.3
9 Patch-ID: bash43-041
11 Bug-Reported-by: Hanno Böck <hanno@hboeck.de>
12 Bug-Reference-ID: <20150623131106.6f111da9@pc1>, <20150707004640.0e61d2f9@pc1>
13 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-06/msg00089.html,
14 http://lists.gnu.org/archive/html/bug-bash/2015-07/msg00018.html
16 Bug-Description:
18 There are several out-of-bounds read errors that occur when completing command
19 lines where assignment statements appear before the command name. The first
20 two appear only when programmable completion is enabled; the last one only
21 happens when listing possible completions.
23 Patch (apply with `patch -p0'):
25 *** a/bash-4.3.40/bashline.c 2014-12-29 14:39:43.000000000 -0500
26 --- b/bashline.c 2015-08-12 10:21:58.000000000 -0400
27 ***************
28 *** 1469,1476 ****
29 --- 1469,1489 ----
30 os = start;
31 n = 0;
32 + was_assignment = 0;
33 s = find_cmd_start (os);
34 e = find_cmd_end (end);
37 + /* Don't read past the end of rl_line_buffer */
38 + if (s > rl_end)
39 + {
40 + s1 = s = e1;
41 + break;
42 + }
43 + /* Or past point if point is within an assignment statement */
44 + else if (was_assignment && s > rl_point)
45 + {
46 + s1 = s = e1;
47 + break;
48 + }
49 /* Skip over assignment statements preceding a command name. If we
50 don't find a command name at all, we can perform command name
51 *** a/bash-4.3.40/lib/readline/complete.c 2013-10-14 09:27:10.000000000 -0400
52 --- b/lib/readline/complete.c 2015-07-31 09:34:39.000000000 -0400
53 ***************
54 *** 690,693 ****
55 --- 690,695 ----
56 if (temp == 0 || *temp == '\0')
57 return (pathname);
58 + else if (temp[1] == 0 && temp == pathname)
59 + return (pathname);
60 /* If the basename is NULL, we might have a pathname like '/usr/src/'.
61 Look for a previous slash and, if one is found, return the portion
62 *** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500
63 --- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400
64 ***************
65 *** 26,30 ****
66 looks for to find the patch level (for the sccs version string). */
68 ! #define PATCHLEVEL 40
70 #endif /* _PATCHLEVEL_H_ */
71 --- 26,30 ----
72 looks for to find the patch level (for the sccs version string). */
74 ! #define PATCHLEVEL 41
76 #endif /* _PATCHLEVEL_H_ */