[gnu.bash.bug] Abend when searching in vi-mode

bengsig@oracle.nl (Bjorn Engsig) (12/12/89)

Bash 1.04 will abend (wonderful IBM term :-) if you search in vi-mode.
This is due to a wrong alloca argument.  The context diffs for vi_mode.c
are below and have been sent to Brian.

*** vi_mode.c.old	Tue Dec 12 15:43:39 1989
--- vi_mode.c	Tue Dec 12 15:46:00 1989
***************
*** 78,84 ****
    /* Reuse the line input buffer to read the search string. */
    the_line[0] = 0;
    rl_end = rl_point = 0;
!   p = (char *)alloca (2 + rl_prompt ? strlen (rl_prompt) : 0);
  
    sprintf (p, "%s%c", rl_prompt ? rl_prompt : "", key);
  
--- 78,84 ----
    /* Reuse the line input buffer to read the search string. */
    the_line[0] = 0;
    rl_end = rl_point = 0;
!   p = (char *)alloca (2 + (rl_prompt ? strlen (rl_prompt) : 0));
  
    sprintf (p, "%s%c", rl_prompt ? rl_prompt : "", key);
  
-- 
Bjorn Engsig,	Domain:		bengsig@oracle.nl, bengsig@oracle.com
		Path:		uunet!{mcsun!orcenl,oracle}!bengsig