|
1 BASH PATCH REPORT |
|
2 ================= |
|
3 |
|
4 Bash-Release: 4.3 |
|
5 Patch-ID: bash43-020 |
|
6 |
|
7 Bug-Reported-by: Jared Yanovich <[email protected]> |
|
8 Bug-Reference-ID: <[email protected]> |
|
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-04/msg00065.html |
|
10 |
|
11 Bug-Description: |
|
12 |
|
13 When PS2 contains a command substitution, here-documents entered in an |
|
14 interactive shell can sometimes cause a segmentation fault. |
|
15 |
|
16 Patch (apply with `patch -p0'): |
|
17 |
|
18 *** ../bash-4.3-patched/shell.h 2012-12-25 21:11:01.000000000 -0500 |
|
19 --- shell.h 2014-06-03 09:24:28.000000000 -0400 |
|
20 *************** |
|
21 *** 169,173 **** |
|
22 int expand_aliases; |
|
23 int echo_input_at_read; |
|
24 ! |
|
25 } sh_parser_state_t; |
|
26 |
|
27 --- 169,174 ---- |
|
28 int expand_aliases; |
|
29 int echo_input_at_read; |
|
30 ! int need_here_doc; |
|
31 ! |
|
32 } sh_parser_state_t; |
|
33 |
|
34 *** ../bash-4.3-patched/parse.y 2014-05-14 09:16:40.000000000 -0400 |
|
35 --- parse.y 2014-04-30 09:27:59.000000000 -0400 |
|
36 *************** |
|
37 *** 2643,2647 **** |
|
38 |
|
39 r = 0; |
|
40 ! while (need_here_doc) |
|
41 { |
|
42 parser_state |= PST_HEREDOC; |
|
43 --- 2643,2647 ---- |
|
44 |
|
45 r = 0; |
|
46 ! while (need_here_doc > 0) |
|
47 { |
|
48 parser_state |= PST_HEREDOC; |
|
49 *************** |
|
50 *** 6076,6079 **** |
|
51 --- 6076,6080 ---- |
|
52 ps->expand_aliases = expand_aliases; |
|
53 ps->echo_input_at_read = echo_input_at_read; |
|
54 + ps->need_here_doc = need_here_doc; |
|
55 |
|
56 ps->token = token; |
|
57 *************** |
|
58 *** 6124,6127 **** |
|
59 --- 6125,6129 ---- |
|
60 expand_aliases = ps->expand_aliases; |
|
61 echo_input_at_read = ps->echo_input_at_read; |
|
62 + need_here_doc = ps->need_here_doc; |
|
63 |
|
64 FREE (token); |
|
65 *** ../bash-4.3-patched/y.tab.c 2014-04-07 11:56:12.000000000 -0400 |
|
66 --- y.tab.c 2014-07-30 09:55:57.000000000 -0400 |
|
67 *************** |
|
68 *** 4955,4959 **** |
|
69 |
|
70 r = 0; |
|
71 ! while (need_here_doc) |
|
72 { |
|
73 parser_state |= PST_HEREDOC; |
|
74 --- 5151,5155 ---- |
|
75 |
|
76 r = 0; |
|
77 ! while (need_here_doc > 0) |
|
78 { |
|
79 parser_state |= PST_HEREDOC; |
|
80 *************** |
|
81 *** 8388,8391 **** |
|
82 --- 8584,8588 ---- |
|
83 ps->expand_aliases = expand_aliases; |
|
84 ps->echo_input_at_read = echo_input_at_read; |
|
85 + ps->need_here_doc = need_here_doc; |
|
86 |
|
87 ps->token = token; |
|
88 *************** |
|
89 *** 8436,8439 **** |
|
90 --- 8633,8637 ---- |
|
91 expand_aliases = ps->expand_aliases; |
|
92 echo_input_at_read = ps->echo_input_at_read; |
|
93 + need_here_doc = ps->need_here_doc; |
|
94 |
|
95 FREE (token); |
|
96 *** ../bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 |
|
97 --- patchlevel.h 2014-03-20 20:01:28.000000000 -0400 |
|
98 *************** |
|
99 *** 26,30 **** |
|
100 looks for to find the patch level (for the sccs version string). */ |
|
101 |
|
102 ! #define PATCHLEVEL 19 |
|
103 |
|
104 #endif /* _PATCHLEVEL_H_ */ |
|
105 --- 26,30 ---- |
|
106 looks for to find the patch level (for the sccs version string). */ |
|
107 |
|
108 ! #define PATCHLEVEL 20 |
|
109 |
|
110 #endif /* _PATCHLEVEL_H_ */ |