Skip to content

Commit

Permalink
fixed bad posix_spawn call causing some apps to crash
Browse files Browse the repository at this point in the history
  • Loading branch information
roothider committed Nov 6, 2024
1 parent 5097e5b commit 5a73966
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions BaseBin/systemhook/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ int posix_spawn_hook_roothide(pid_t *restrict pidp, const char *restrict path, s
int (*set_process_debugged)(uint64_t pid, bool fullyDebugged),
double jetsamMultiplier)
{
if(!path) { //Don't crash here due to bad posix_spawn call
return posix_spawn_hook_shared(pidp, path, desc, argv, envp, orig, trust_binary, set_process_debugged, jetsamMultiplier);
}

if(!desc || !desc->attrp) {
posix_spawnattr_t attr=NULL;
posix_spawnattr_init(&attr);
Expand Down

0 comments on commit 5a73966

Please sign in to comment.