summaryrefslogtreecommitdiff
path: root/ipc/mach_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/mach_debug.c')
-rw-r--r--ipc/mach_debug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ipc/mach_debug.c b/ipc/mach_debug.c
index efb07a4f..6ddc89b2 100644
--- a/ipc/mach_debug.c
+++ b/ipc/mach_debug.c
@@ -257,6 +257,9 @@ mach_port_kernel_object(
ipc_port_t port;
kern_return_t kr;
+ if (space == IS_NULL)
+ return KERN_INVALID_TASK;
+
kr = ipc_right_lookup_read(space, name, &entry);
if (kr != KERN_SUCCESS)
return kr;