projects
/
suckless
/
slstatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b271403
)
fix overflow in run_command()
author
Aaron Marcher
<info@nulltime.net>
Thu, 20 Apr 2017 20:20:19 +0000
(22:20 +0200)
committer
Aaron Marcher
<info@nulltime.net>
Thu, 20 Apr 2017 20:20:19 +0000
(22:20 +0200)
slstatus.c
patch
|
blob
|
history
diff --git
a/slstatus.c
b/slstatus.c
index 5500a6209958ee5712f6085aa646c9c81c0ff921..f06c373ab8d091d6e42e9fb8064689abe293aba5 100644
(file)
--- a/
slstatus.c
+++ b/
slstatus.c
@@
-451,7
+451,7
@@
run_command(const char *cmd)
pclose(fp);
buf[sizeof(buf) - 1] = '\0';
- if ((nlptr = str
str(buf, "\n"
)) != NULL) {
+ if ((nlptr = str
rchr(buf, '\n'
)) != NULL) {
nlptr[0] = '\0';
}