pinosaur
/
dmenu.git
/ commitdiff
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
efc1e54
..
c25dc82
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;