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:
965a71d
)
run_command: strlen() will not function if string is not null terminated
author
Aaron Marcher
<info@nulltime.net>
Sat, 7 Jan 2017 20:19:40 +0000
(21:19 +0100)
committer
Aaron Marcher
<info@nulltime.net>
Sat, 7 Jan 2017 20:19:40 +0000
(21:19 +0100)
slstatus.c
patch
|
blob
|
history
diff --git
a/slstatus.c
b/slstatus.c
index 3ad79c046549d2347b4c60bcfd046cbed81a340e..4432e1896cae09329f41fca267f3ca91eb3a743a 100644
(file)
--- a/
slstatus.c
+++ b/
slstatus.c
@@
-426,7
+426,7
@@
run_command(const char *cmd)
}
fgets(buf, sizeof(buf), fp);
pclose(fp);
- buf[s
trlen
(buf)] = '\0';
+ buf[s
izeof
(buf)] = '\0';
if ((nlptr = strstr(buf, "\n")) != NULL) {
nlptr[0] = '\0';