diff options
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/mach_port.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ipc/mach_port.c b/ipc/mach_port.c index db6dae61..a07b4fe9 100644 --- a/ipc/mach_port.c +++ b/ipc/mach_port.c @@ -160,6 +160,7 @@ mach_port_names( vm_offset_t addr2; /* allocated memory, for types */ vm_map_copy_t memory1; /* copied-in memory, for names */ vm_map_copy_t memory2; /* copied-in memory, for types */ + ipc_entry_num_t bound; /* safe simplifying assumption */ assert_static(sizeof(mach_port_name_t) == sizeof(mach_port_type_t)); @@ -170,7 +171,6 @@ mach_port_names( size = 0; for (;;) { - ipc_entry_num_t bound; vm_size_t size_needed; is_read_lock(space); @@ -240,6 +240,7 @@ mach_port_names( names, types, &actual); } } + assert(actual < bound); is_read_unlock(space); if (actual == 0) { |