Merge pull request #39 from stoeckmann/fgets On success, fgets always terminates the result.
Aaron Marcher info@nulltime.net
Thu, 20 Apr 2017 22:14:56 +0200
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
slstatus.c
→
slstatus.c
@@ -447,7 +447,7 @@ if (fp == NULL) {
warn("Failed to get command output for %s", cmd); return smprintf("%s", UNKNOWN_STR); } - fgets(buf, sizeof(buf) - 1, fp); + fgets(buf, sizeof(buf), fp); pclose(fp); buf[sizeof(buf) - 1] = '\0';