diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2023-01-24 00:10:45 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-01-25 01:57:35 +0100 |
commit | 7d8fb901b68b6a88be9adc5a458fbba367a371bf (patch) | |
tree | e8bde2d1a20d91f8847d490f6c2a4c469a58b907 | |
parent | a532e6854fcd9f1866841321def9a8a99966067e (diff) | |
download | gnumach-7d8fb901b68b6a88be9adc5a458fbba367a371bf.tar.gz gnumach-7d8fb901b68b6a88be9adc5a458fbba367a371bf.tar.bz2 gnumach-7d8fb901b68b6a88be9adc5a458fbba367a371bf.zip |
Set kr if copy cannot be copied to user space
Compiler will complain otherwise that kr is not initialized.
Message-Id: <Y89oVcEnyPIiQ4ef@jupiter.tail36e24.ts.net>
-rw-r--r-- | ipc/ipc_kmsg.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c index 2c9d4988..dac4f5dc 100644 --- a/ipc/ipc_kmsg.c +++ b/ipc/ipc_kmsg.c @@ -2466,8 +2466,10 @@ ipc_kmsg_copyout_body( mach_port_t *src = (mach_port_t*)data; mach_port_name_t *dst = (mach_port_name_t*)addr; for (int i=0; i<number; i++) { - if (copyout_port(src + i, dst + i)) + if (copyout_port(src + i, dst + i)) { + kr = KERN_FAILURE; goto vm_copyout_failure; + } } } else { (void) copyoutmap(map, (char *) data, |