fix overflow in run_command()
Aaron Marcher info@nulltime.net
Thu, 20 Apr 2017 22:20:19 +0200
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
slstatus.c
→
slstatus.c
@@ -451,7 +451,7 @@ fgets(buf, sizeof(buf), fp);
pclose(fp); buf[sizeof(buf) - 1] = '\0'; - if ((nlptr = strstr(buf, "\n")) != NULL) { + if ((nlptr = strrchr(buf, '\n')) != NULL) { nlptr[0] = '\0'; }