diff options
author | Justus Winter <justus@gnupg.org> | 2016-09-11 12:05:04 +0200 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2016-09-11 12:05:04 +0200 |
commit | 25d5ceed31dd5e9256ebb4479397bfb5eed78155 (patch) | |
tree | 82ef3507e893c95c2c0687745a20231172b6a6a9 /ipc/mach_debug.c | |
parent | e5c7d1c1dda40f8f262e26fed911bfe03027993b (diff) | |
download | gnumach-25d5ceed31dd5e9256ebb4479397bfb5eed78155.tar.gz gnumach-25d5ceed31dd5e9256ebb4479397bfb5eed78155.tar.bz2 gnumach-25d5ceed31dd5e9256ebb4479397bfb5eed78155.zip |
ipc: Fix crash in debug code.
* ipc/mach_debug.c (mach_port_kernel_object): Check that the receiver
is valid.
Diffstat (limited to 'ipc/mach_debug.c')
-rw-r--r-- | ipc/mach_debug.c | 3 |
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; |