From: kfraser@localhost.localdomain Date: Tue, 7 Aug 2007 08:04:44 +0000 (+0100) Subject: [ACM] Explicitly cast byte arrays when used in copy_from_guest X-Git-Tag: 3.2.0-rc1~378^2~2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7b448e13e0f816fab36a5a9f46a12fce3d585de8;p=xen.git [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 --- 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) ) {