Skip to content

Commit 5ca0635

Browse files
committed
Fix IWUY 2
1 parent 7bb9aac commit 5ca0635

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

shim/linux/src/entry.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ dispatch_system_kvm_get_msr_index_list(
271271
if (platform_copy_to_user(
272272
user_args,
273273
&mut_args,
274-
sizeof(mut_args.nmsrs)
274+
sizeof(mut_args.nmsrs) +
275275
mut_args.nmsrs * sizeof(*mut_args.indices))) {
276276
bferror("platform_copy_to_user indices failed");
277277
return -EINVAL;
@@ -337,7 +337,7 @@ dispatch_system_kvm_get_supported_cpuid(
337337
if (platform_copy_to_user(
338338
pmut_user_args,
339339
pmut_mut_args,
340-
sizeof(pmut_mut_args->nent)
340+
sizeof(pmut_mut_args->nent) +
341341
pmut_mut_args->nent * sizeof(*pmut_mut_args->entries))) {
342342
bferror("platform_copy_to_user failed");
343343
goto out_free;
@@ -1053,7 +1053,7 @@ dispatch_vcpu_kvm_get_msrs(
10531053
goto OUT_FREE;
10541054
}
10551055

1056-
mut_size = sizeof(mut_args->nmsrs) + sizeof(mut_args->pad)
1056+
mut_size = sizeof(mut_args->nmsrs) + sizeof(mut_args->pad) +
10571057
sizeof(mut_args->entries[0]) * mut_args->nmsrs;
10581058

10591059
if (platform_copy_from_user(mut_args, user_args, mut_size)) {

0 commit comments

Comments
 (0)