Skip to content

Commit

Permalink
fleaks.c: initialize command buffer before calling system
Browse files Browse the repository at this point in the history
  • Loading branch information
G4Vi committed Oct 2, 2023
1 parent cc8c56e commit ac06045
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libc/stdio/fleaks.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ void CheckForFileLeaks(void) {
}
}
if (gotsome) {
char proc[64];
*p++ = '\n';
*p = 0;
write(2, msg, p - msg);
char proc[64];
p = proc;
p = stpcpy(p, "ls -hal /proc/");
p = FormatInt32(p, getpid());
p = stpcpy(p, "/fd");
Expand Down

0 comments on commit ac06045

Please sign in to comment.