On 3/27/14 2:36 PM, Matthias Klose wrote:
> seen when entering q!, then leaving the shell with ^D
Thanks. It's actually running any other command after the failed expansion
causes the input line to be resized. Here's a patch.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/
*** ../bash-4.3-patched/parse.y 2014-02-11 09:42:10.000000000 -0500
--- parse.y 2014-03-27 16:33:29.000000000 -0400
***************
*** 2425,2429 ****
if (shell_input_line_terminator != EOF)
{
! if (shell_input_line_size < SIZE_MAX && shell_input_line_len > shell_input_line_size - 3)
shell_input_line = (char *)xrealloc (shell_input_line,
1 + (shell_input_line_size += 2));
--- 2425,2429 ----
if (shell_input_line_terminator != EOF)
{
! if (shell_input_line_size < SIZE_MAX-3 && (shell_input_line_len+3 > shell_input_line_size))
shell_input_line = (char *)xrealloc (shell_input_line,
1 + (shell_input_line_size += 2));