From 405a9decabb47a240abe52a8975166df3119b6ac Mon Sep 17 00:00:00 2001 From: okan Date: Thu, 5 Jun 2008 04:01:37 +0000 Subject: prevent trying to exec a null char; could potentially happen with a canceled or empty searchstr. ok oga@ --- menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'menu.c') diff --git a/menu.c b/menu.c index a98ad58..df870fd 100644 --- a/menu.c +++ b/menu.c @@ -149,7 +149,7 @@ menu_filter(struct menu_q *menuq, char *prompt, char *initial, int dummy, } } out: - if (dummy == 0 && mi->dummy) { /* no match */ + if ((dummy == 0 && mi->dummy) || (mi->text[0] == '\0')) { /* no match */ xfree (mi); mi = NULL; xu_ptr_ungrab(); -- cgit v1.2.3-2-gb3c3