[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [ACM] Explicitly cast byte arrays when used in copy_from_guest



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1186473884 -3600
# Node ID 007a11317ce88ce348b620280f87e709ace855ba
# Parent  6f18f5bdeea3473766929f9caa10cc163a411aa3
[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@xxxxxxxxxx>
---
 xen/acm/acm_policy.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 6f18f5bdeea3 -r 007a11317ce8 xen/acm/acm_policy.c
--- a/xen/acm/acm_policy.c      Mon Aug 06 15:33:42 2007 +0100
+++ b/xen/acm/acm_policy.c      Tue Aug 07 09:04:44 2007 +0100
@@ -710,10 +710,10 @@ acm_change_policy(struct acm_change_poli
         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_d
         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) )
     {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.