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

[Xen-changelog] [xen master] pv-grub: correct sizeof usage



commit 0ac7e6a2c5f617c47bb99c9e799a0de53fa3290c
Author:     Matthew Daley <mattd@xxxxxxxxxxx>
AuthorDate: Sat Mar 29 18:08:08 2014 +1300
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Tue Apr 1 11:32:05 2014 +0100

    pv-grub: correct sizeof usage
    
    We were lucky that sizeof(frame) >= sizeof(*frame) anyway.
    
    Signed-off-by: Matthew Daley <mattd@xxxxxxxxxxx>
    Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 stubdom/grub/mini-os.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stubdom/grub/mini-os.c b/stubdom/grub/mini-os.c
index 64ab962..9d4bcc7 100644
--- a/stubdom/grub/mini-os.c
+++ b/stubdom/grub/mini-os.c
@@ -333,7 +333,7 @@ struct frame {
 static void minios_transmit (struct nic *nic, const char *d, unsigned int t,
                              unsigned int s, const char *p)
 {
-    struct frame *frame = alloca(sizeof(frame) + s);
+    struct frame *frame = alloca(sizeof(*frame) + s);
 
     memcpy(frame->dest, d, ETH_ALEN);
     memcpy(frame->src, nic->node_addr, ETH_ALEN);
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.