diff options
author | Aaron Marcher <info@nulltime.net> | 2017-04-20 22:20:19 +0200 |
---|---|---|
committer | Aaron Marcher <info@nulltime.net> | 2017-04-20 22:20:19 +0200 |
commit | c288663ebdeb78ef50a6378651bb14380ed4b20a (patch) | |
tree | d34bb69436c1048972e9effaf1896e365929a2b0 /slstatus.c | |
parent | b2714032e5087e63b5744d3fb8a131e13e1d6f9a (diff) |
fix overflow in run_command()
Diffstat (limited to 'slstatus.c')
-rw-r--r-- | slstatus.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -451,7 +451,7 @@ run_command(const char *cmd) pclose(fp); buf[sizeof(buf) - 1] = '\0'; - if ((nlptr = strstr(buf, "\n")) != NULL) { + if ((nlptr = strrchr(buf, '\n')) != NULL) { nlptr[0] = '\0'; } |