On 4/23/17 12:14 PM, Eduardo Bustamante wrote:

> I tried the following patch:
> 
> dualbus@debian:~/src/gnu/bash$ git diff -- bashline.c
> diff --git a/bashline.c b/bashline.c
> index 129714aa..7884416a 100644
> --- a/bashline.c
> +++ b/bashline.c
> @@ -2545,7 +2545,7 @@ static void
>  maybe_make_readline_line (new_line)
>       char *new_line;
>  {
> -  if (strcmp (new_line, rl_line_buffer) != 0)
> +  if (new_line && strcmp (new_line, rl_line_buffer) != 0)
>      {
>        rl_point = rl_end;
> 
> Which gets rid of the null pointer deference, but it seems to leave
> the terminal in a bad state, so the patch is not complete and I have
> no clue why.

It's a good fix, and it doesn't do anything to the terminal.  Your return
key doesn't work any more since you've rebound ^M, but that's intentional.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to