Hi Martijn,

Martijn van Duren wrote on Tue, Mar 22, 2016 at 09:57:33AM +0100:

> I found this one by exiting bc -l via ^D.
> It should be fine since ct_encode_string also returns NULL
> when tmp is NULL.

Oops, indeed, sorry for overlooking that edge case.
Completely correct.

> OK?

OK schwarze@; please commit quickly.
  Ingo


> Index: eln.c
> ===================================================================
> RCS file: /cvs/src/lib/libedit/eln.c,v
> retrieving revision 1.12
> diff -u -p -r1.12 eln.c
> --- eln.c     21 Mar 2016 18:40:25 -0000      1.12
> +++ eln.c     22 Mar 2016 08:56:48 -0000
> @@ -72,7 +72,8 @@ el_gets(EditLine *el, int *nread)
>       const wchar_t *tmp;
>       wchar_t *rd, *wr;
>  
> -     tmp = el_wgets(el, nread);
> +     if ((tmp = el_wgets(el, nread)) == NULL)
> +             return NULL;
>  
>       /*
>        * Temporary until the libedit audit is complete:

Reply via email to