ia64/xen-unstable

changeset 15721:007a11317ce8

[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 <stefanb@us.ibm.com>
author kfraser@localhost.localdomain
date Tue Aug 07 09:04:44 2007 +0100 (2007-08-07)
parents 6f18f5bdeea3
children ff2dae3ebb1d
files xen/acm/acm_policy.c
line diff
     1.1 --- a/xen/acm/acm_policy.c	Mon Aug 06 15:33:42 2007 +0100
     1.2 +++ b/xen/acm/acm_policy.c	Tue Aug 07 09:04:44 2007 +0100
     1.3 @@ -710,10 +710,10 @@ acm_change_policy(struct acm_change_poli
     1.4          goto acm_chg_policy_exit;
     1.5      }
     1.6  
     1.7 -    if ( copy_from_guest(dels.array,
     1.8 +    if ( copy_from_guest((u8 *)dels.array,
     1.9                           chgpolicy->del_array,
    1.10                           chgpolicy->delarray_size) ||
    1.11 -         copy_from_guest(ssidmap.array,
    1.12 +         copy_from_guest((u8 *)ssidmap.array,
    1.13                           chgpolicy->chg_array,
    1.14                           chgpolicy->chgarray_size) ||
    1.15           copy_from_guest(binpolicy,
    1.16 @@ -844,7 +844,7 @@ acm_relabel_domains(struct acm_relabel_d
    1.17          memset(errors.array, 0x0, sizeof(uint32_t) * errors.num_items);
    1.18      }
    1.19  
    1.20 -    if ( copy_from_guest(relabels.array,
    1.21 +    if ( copy_from_guest((u8 *)relabels.array,
    1.22                           relabel->relabel_map,
    1.23                           relabel->relabel_map_size) )
    1.24      {