Re: [hackers] [dmenu][PATCH] fix: Do not crash on e.g. dmenu < /dev/null

From: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Tue, 28 Jun 2016 18:07:19 +0200

On Tue, Jun 28, 2016 at 01:11:50AM -0400, S. Gilles wrote:
> ---
> dmenu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dmenu.c b/dmenu.c
> index 0e7b70b..e926eca 100644
> --- a/dmenu.c
> +++ b/dmenu.c
> _AT_@ -480,7 +480,7 @@ readstdin(void)
> }
> if (items)
> items[i].text = NULL;
> - inputw = TEXTW(items[imax].text);
> + inputw = items ? TEXTW(items[imax].text) : 0;
> lines = MIN(lines, i);
> }
>
> --
> 2.9.0
>
>

Applied, thanks!

-- 
Kind regards,
Hiltjo
Received on Tue Jun 28 2016 - 18:07:19 CEST

This archive was generated by hypermail 2.3.0 : Tue Jun 28 2016 - 18:12:17 CEST