Browse Source

fix overflow in run_command()

master
Aaron Marcher 9 years ago
parent
commit
c288663ebd
No known key found for this signature in database GPG Key ID: 74B048E5C2474F9A
  1. 2
      slstatus.c

2
slstatus.c

@ -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';
}

Loading…
Cancel
Save