summaryrefslogtreecommitdiff
path: root/app/cwm/menu.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2008-06-05 04:01:38 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2008-06-05 04:01:38 +0000
commit2091894e7dba26f2c1159d6183b06b4197ba6398 (patch)
treea03b6752390b594e401c0e82d46f33ad9c827162 /app/cwm/menu.c
parent28eefaf4fd96e151ac227ced2fa879bf6a186446 (diff)
prevent trying to exec a null char; could potentially happen with a
canceled or empty searchstr. ok oga@
Diffstat (limited to 'app/cwm/menu.c')
-rw-r--r--app/cwm/menu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/cwm/menu.c b/app/cwm/menu.c
index a98ad58d4..df870fdc7 100644
--- a/app/cwm/menu.c
+++ b/app/cwm/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();