summaryrefslogtreecommitdiff
path: root/source/a/bash/bash-5.0-patches/bash50-002
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2019-01-19 00:11:43 +0000
committerEric Hameleers <alien@slackware.com>2019-01-19 08:59:45 +0100
commitf8d5f8311e58321bd273c482a4e58ab22a7d8300 (patch)
tree62abb6b854640895211b4cca949e4d46a9c2cdbc /source/a/bash/bash-5.0-patches/bash50-002
parent338d079628d37b0254dda8e86f5a36a03a614717 (diff)
downloadcurrent-f8d5f8311e58321bd273c482a4e58ab22a7d8300.tar.gz
Sat Jan 19 00:11:43 UTC 201920190119001143
a/bash-5.0.002-x86_64-1.txz: Upgraded. d/rust-1.32.0-x86_64-1.txz: Upgraded. l/gcr-3.28.1-x86_64-1.txz: Upgraded. n/nghttp2-1.36.0-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/a/bash/bash-5.0-patches/bash50-002')
-rw-r--r--source/a/bash/bash-5.0-patches/bash50-002113
1 files changed, 113 insertions, 0 deletions
diff --git a/source/a/bash/bash-5.0-patches/bash50-002 b/source/a/bash/bash-5.0-patches/bash50-002
new file mode 100644
index 00000000..3fc8272f
--- /dev/null
+++ b/source/a/bash/bash-5.0-patches/bash50-002
@@ -0,0 +1,113 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.0
+Patch-ID: bash50-002
+
+Bug-Reported-by: Ante Peric <synthmeat@gmail.com>
+Bug-Reference-ID: <B7E3B567-2467-4F7B-B6B9-CA4E75A9C93F@gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2019-01/msg00095.html
+
+Bug-Description:
+
+When an alias value ends with an unquoted literal tab (not part of a quoted
+string or comment), alias expansion cannot correctly detect the end of the
+alias value after expanding it.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.0/parser.h 2018-12-28 19:11:18.000000000 -0500
+--- parser.h 2019-01-11 15:13:03.000000000 -0500
+***************
+*** 48,51 ****
+--- 48,52 ----
+ #define PST_REDIRLIST 0x080000 /* parsing a list of redirections preceding a simple command name */
+ #define PST_COMMENT 0x100000 /* parsing a shell comment; used by aliases */
++ #define PST_ENDALIAS 0x200000 /* just finished expanding and consuming an alias */
+
+ /* Definition of the delimiter stack. Needed by parse.y and bashhist.c. */
+*** ../bash-5.0/parse.y 2019-01-02 13:57:34.000000000 -0500
+--- parse.y 2019-01-14 08:23:31.000000000 -0500
+***************
+*** 2558,2567 ****
+ pushed_string_list->flags != PSH_DPAREN &&
+ (parser_state & PST_COMMENT) == 0 &&
+ shell_input_line_index > 0 &&
+! shell_input_line[shell_input_line_index-1] != ' ' &&
+ shell_input_line[shell_input_line_index-1] != '\n' &&
+ shellmeta (shell_input_line[shell_input_line_index-1]) == 0 &&
+ (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"'))
+ {
+ return ' '; /* END_ALIAS */
+ }
+--- 2558,2569 ----
+ pushed_string_list->flags != PSH_DPAREN &&
+ (parser_state & PST_COMMENT) == 0 &&
++ (parser_state & PST_ENDALIAS) == 0 && /* only once */
+ shell_input_line_index > 0 &&
+! shellblank (shell_input_line[shell_input_line_index-1]) == 0 &&
+ shell_input_line[shell_input_line_index-1] != '\n' &&
+ shellmeta (shell_input_line[shell_input_line_index-1]) == 0 &&
+ (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"'))
+ {
++ parser_state |= PST_ENDALIAS;
+ return ' '; /* END_ALIAS */
+ }
+***************
+*** 2572,2575 ****
+--- 2574,2578 ----
+ if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE)
+ {
++ parser_state &= ~PST_ENDALIAS;
+ pop_string ();
+ uc = shell_input_line[shell_input_line_index];
+*** ../bash-5.0/y.tab.c 2019-01-02 13:57:43.000000000 -0500
+--- y.tab.c 2019-01-14 08:39:23.000000000 -0500
+***************
+*** 4874,4883 ****
+ pushed_string_list->flags != PSH_DPAREN &&
+ (parser_state & PST_COMMENT) == 0 &&
+ shell_input_line_index > 0 &&
+! shell_input_line[shell_input_line_index-1] != ' ' &&
+ shell_input_line[shell_input_line_index-1] != '\n' &&
+ shellmeta (shell_input_line[shell_input_line_index-1]) == 0 &&
+ (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"'))
+ {
+ return ' '; /* END_ALIAS */
+ }
+--- 4874,4885 ----
+ pushed_string_list->flags != PSH_DPAREN &&
+ (parser_state & PST_COMMENT) == 0 &&
++ (parser_state & PST_ENDALIAS) == 0 && /* only once */
+ shell_input_line_index > 0 &&
+! shellblank (shell_input_line[shell_input_line_index-1]) == 0 &&
+ shell_input_line[shell_input_line_index-1] != '\n' &&
+ shellmeta (shell_input_line[shell_input_line_index-1]) == 0 &&
+ (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"'))
+ {
++ parser_state |= PST_ENDALIAS;
+ return ' '; /* END_ALIAS */
+ }
+***************
+*** 4888,4891 ****
+--- 4890,4894 ----
+ if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE)
+ {
++ parser_state &= ~PST_ENDALIAS;
+ pop_string ();
+ uc = shell_input_line[shell_input_line_index];
+*** ../bash-5.0/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2016-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 1
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 2
+
+ #endif /* _PATCHLEVEL_H_ */