Skip to content

Commit

Permalink
windows: Fix cpu_type_from_pid() for non-existent PIDs
Browse files Browse the repository at this point in the history
Co-authored-by: Håvard Sørbø <[email protected]>
  • Loading branch information
oleavr and hsorbo committed Dec 8, 2024
1 parent 9b6bebf commit e49e63c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gum/backend-windows/gumprocess-windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,10 @@ gum_windows_cpu_type_from_pid (guint pid,

switch (code)
{
/* TODO: Handle code for when PID doesn't exist. */
case ERROR_INVALID_PARAMETER:
g_set_error (error, GUM_ERROR, GUM_ERROR_NOT_FOUND,
"Process not found");
break;
case ERROR_ACCESS_DENIED:
g_set_error (error, GUM_ERROR, GUM_ERROR_PERMISSION_DENIED,
"Permission denied");
Expand Down

0 comments on commit e49e63c

Please sign in to comment.