Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardobranco777 committed Mar 31, 2024
1 parent f7064c8 commit 17d7062
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bsd/kinfo_getargv.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,11 @@ kinfo_getargv(pid_t pid)
goto bad;

if (buf[0] != '/') {
argv[i++] = kinfo_getpathname(pid);
if (argv[0] == NULL)
goto bad;
off += strlen(buf) + 1;
argv[0] = kinfo_getpathname(pid);
if (argv[0] != NULL) {
off += strlen(buf) + 1;
i++;
}
}

for (; i < argc; i++) {
Expand Down

0 comments on commit 17d7062

Please sign in to comment.