fleaks.c: initialize command buffer before calling system (#904)

This commit is contained in:
Gavin Hayes 2023-10-02 16:31:15 -04:00 committed by GitHub
parent cc8c56e814
commit c315315896
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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");