7 Bug-Reported-by: Michael Albinus <michael.albinus@gmx.de>
8 Bug-Reference-ID: <87bm36k3kz.fsf@gmx.de>
9 Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2019-02/msg00111.html
13 When HISTSIZE is set to 0, history expansion can leave the history length
14 set to an incorrect value, leading to subsequent attempts to access invalid
17 Patch (apply with `patch -p0'):
19 *** ../bash-5.0-patched/bashhist.c 2018-07-05 22:41:14.000000000 -0400
20 --- bashhist.c 2019-02-20 16:20:04.000000000 -0500
23 if (!history_expansion_inhibited && history_expansion && history_expansion_p (line))
25 /* If we are expanding the second or later line of a multi-line
26 command, decrease history_length so references to history expansions
27 in these lines refer to the previous history entry and not the
29 if (history_length > 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1)
31 expanded = history_expand (line, &history_value);
32 if (history_length >= 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1)
37 if (!history_expansion_inhibited && history_expansion && history_expansion_p (line))
41 /* If we are expanding the second or later line of a multi-line
42 command, decrease history_length so references to history expansions
43 in these lines refer to the previous history entry and not the
45 + old_len = history_length;
46 if (history_length > 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1)
48 expanded = history_expand (line, &history_value);
49 if (history_length >= 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1)
50 ! history_length = old_len;
54 *** ../bash-5.0/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
55 --- patchlevel.h 2016-10-01 11:01:28.000000000 -0400
58 looks for to find the patch level (for the sccs version string). */
60 ! #define PATCHLEVEL 7
62 #endif /* _PATCHLEVEL_H_ */
64 looks for to find the patch level (for the sccs version string). */
66 ! #define PATCHLEVEL 8
68 #endif /* _PATCHLEVEL_H_ */