aboutsummaryrefslogtreecommitdiff
path: root/ipc/ipc_kmsg.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-10-01 17:35:01 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-10-01 19:33:20 +0200
commitb63dea5ca946c3956637a7bf85a1002866b20cd6 (patch)
tree682eb89c30f95c85a4a2b158fcdfa867c2fa56c8 /ipc/ipc_kmsg.c
parent126c0364bf7d72d4f2ecf1ad2f4ebe1d2667940d (diff)
downloadgnumach-b63dea5ca946c3956637a7bf85a1002866b20cd6.tar.gz
gnumach-b63dea5ca946c3956637a7bf85a1002866b20cd6.tar.bz2
gnumach-b63dea5ca946c3956637a7bf85a1002866b20cd6.zip
copyinmsg: Check that we have not overflown
This if of course too late in case of a failure, but better assert than get awful bugs, and it's really not supposed to happen.
Diffstat (limited to 'ipc/ipc_kmsg.c')
-rw-r--r--ipc/ipc_kmsg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c
index 105e54d4..33e4d57c 100644
--- a/ipc/ipc_kmsg.c
+++ b/ipc/ipc_kmsg.c
@@ -505,7 +505,7 @@ ipc_kmsg_get(
ikm_init(kmsg, ksize);
}
- if (copyinmsg(msg, &kmsg->ikm_header, size)) {
+ if (copyinmsg(msg, &kmsg->ikm_header, size, kmsg->ikm_size)) {
ikm_free(kmsg);
return MACH_SEND_INVALID_DATA;
}