slstatus

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.beauhilton.com/slstatus.git
Log | Files | Refs | README | LICENSE

commit 8a29374783251da5ff23831e03c761b4a58eff03
parent 965a71d6784124bb101d9005b92276e2ec1ccca3
Author: Aaron Marcher <info@nulltime.net>
Date:   Sat,  7 Jan 2017 21:19:40 +0100

run_command: strlen() will not function if string is not null terminated

Diffstat:
Mslstatus.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/slstatus.c b/slstatus.c @@ -426,7 +426,7 @@ run_command(const char *cmd) } fgets(buf, sizeof(buf), fp); pclose(fp); - buf[strlen(buf)] = '\0'; + buf[sizeof(buf)] = '\0'; if ((nlptr = strstr(buf, "\n")) != NULL) { nlptr[0] = '\0';