From 7b448e13e0f816fab36a5a9f46a12fce3d585de8 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Tue, 7 Aug 2007 09:04:44 +0100 Subject: [PATCH] [ACM] Explicitly cast byte arrays when used in copy_from_guest Explicitly cast the target array type to an array of 'u8' since the number of bytes copied is calculated from the type of element in the target array times the number of elements (3rd parameter). Signed-off-by: Stefan Berger --- xen/acm/acm_policy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/acm/acm_policy.c b/xen/acm/acm_policy.c index 5fd57e872b..23c5bbc79c 100644 --- a/xen/acm/acm_policy.c +++ b/xen/acm/acm_policy.c @@ -710,10 +710,10 @@ acm_change_policy(struct acm_change_policy *chgpolicy) goto acm_chg_policy_exit; } - if ( copy_from_guest(dels.array, + if ( copy_from_guest((u8 *)dels.array, chgpolicy->del_array, chgpolicy->delarray_size) || - copy_from_guest(ssidmap.array, + copy_from_guest((u8 *)ssidmap.array, chgpolicy->chg_array, chgpolicy->chgarray_size) || copy_from_guest(binpolicy, @@ -844,7 +844,7 @@ acm_relabel_domains(struct acm_relabel_doms *relabel) memset(errors.array, 0x0, sizeof(uint32_t) * errors.num_items); } - if ( copy_from_guest(relabels.array, + if ( copy_from_guest((u8 *)relabels.array, relabel->relabel_map, relabel->relabel_map_size) ) { -- 2.39.5