summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2008-06-05 04:01:37 +0000
committerokan <okan>2008-06-05 04:01:37 +0000
commit610e8e83acf679d74a5f22912084a9d8a78ccfe1 (patch)
treeec5eff55b00fffb1b5eb854d76683f652c25e1c7
parentefbfc5fa42ad9d9bb65ef01635b9598a0cd36de0 (diff)
downloadcwm-610e8e83acf679d74a5f22912084a9d8a78ccfe1.tar.gz
cwm-610e8e83acf679d74a5f22912084a9d8a78ccfe1.tar.xz
cwm-610e8e83acf679d74a5f22912084a9d8a78ccfe1.zip
prevent trying to exec a null char; could potentially happen with a
canceled or empty searchstr.

ok oga@
-rw-r--r--menu.c2
1 files changed, 1 insertions, 1 deletions
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();