dmenu

my fork of dmenu
Index Commits Files Refs README LICENSE
commit ec64f273fb7660d3746eb765dc02e40726a54294
parent 0d12a47415edba5db73f56dba76f123394581387
Author: Anselm R Garbe <anselm@garbe.us>
Date:   Wed, 17 Apr 2013 20:59:12 +0200

applied Alex Sedov's Tab buffer termination patch, thanks

Diffstat:
Mdmenu.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dmenu.c b/dmenu.c
@@ -392,7 +392,8 @@ keypress(XKeyEvent *ev) {
     case XK_Tab:
         if(!sel)
             return;
-        strncpy(text, sel->text, sizeof text);
+        strncpy(text, sel->text, sizeof text - 1);
+        text[sizeof text - 1] = '\0';
         cursor = strlen(text);
         match();
         break;