From b63dea5ca946c3956637a7bf85a1002866b20cd6 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 1 Oct 2023 17:35:01 +0200 Subject: 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. --- ipc/mach_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipc/mach_msg.c') diff --git a/ipc/mach_msg.c b/ipc/mach_msg.c index fb6e6dfc..118ce4b3 100644 --- a/ipc/mach_msg.c +++ b/ipc/mach_msg.c @@ -460,7 +460,7 @@ mach_msg_trap( goto slow_get; if (copyinmsg(msg, &kmsg->ikm_header, - send_size)) { + send_size, kmsg->ikm_size)) { ikm_free(kmsg); goto slow_get; } -- cgit v1.2.3