aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--x86_64/copy_user.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/x86_64/copy_user.c b/x86_64/copy_user.c
index 86d23525..ae17c368 100644
--- a/x86_64/copy_user.c
+++ b/x86_64/copy_user.c
@@ -194,6 +194,8 @@ int copyinmsg (const void *userbuf, void *kernelbuf, const size_t usize)
"mach_msg_header_t and mach_msg_user_header_t expected to be of the same size");
if (copyin(umsg, kmsg, sizeof(mach_msg_header_t)))
return 1;
+ kmsg->msgh_remote_port &= 0xFFFFFFFF; // FIXME: still have port names here
+ kmsg->msgh_local_port &= 0xFFFFFFFF; // also, this assumes little-endian
#endif
vm_offset_t usaddr, ueaddr, ksaddr;