projects
/
suckless
/
dmenu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d12a47
)
applied Alex Sedov's Tab buffer termination patch, thanks
author
Anselm R Garbe
<anselm@garbe.us>
Wed, 17 Apr 2013 18:59:12 +0000
(20:59 +0200)
committer
Anselm R Garbe
<anselm@garbe.us>
Wed, 17 Apr 2013 18:59:12 +0000
(20:59 +0200)
dmenu.c
patch
|
blob
|
history
diff --git
a/dmenu.c
b/dmenu.c
index efc1e54b16e6e47d9f6643fb829df688f7ffe0fb..c25dc82373f623757393c593eff6bf6292a76151 100644
(file)
--- 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;