WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [ACM] Explicitly cast byte arrays when us

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [ACM] Explicitly cast byte arrays when used in copy_from_guest
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Aug 2007 05:30:32 -0700
Delivery-date: Tue, 07 Aug 2007 05:29:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [ACM] Explicitly cast byte arrays when used in copy_from_guest, Xen patchbot-unstable <=