From: Matthew Daley <mattd@bugfuzz.com>
To: xen-devel@lists.xenproject.org
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>,
Matthew Daley <mattd@bugfuzz.com>,
xen-devel@lists.xen.org,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH] pv-grub: correct sizeof usage
Date: Sat, 29 Mar 2014 18:08:08 +1300 [thread overview]
Message-ID: <1396069688-5880-1-git-send-email-mattd@bugfuzz.com> (raw)
We were lucky that sizeof(frame) >= sizeof(*frame) anyway.
Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
---
stubdom/grub/mini-os.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
1.9.0
next reply other threads:[~2014-03-29 5:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-29 5:08 Matthew Daley [this message]
2014-03-30 7:29 ` [PATCH] pv-grub: correct sizeof usage Samuel Thibault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1396069688-5880-1-git-send-email-mattd@bugfuzz.com \
--to=mattd@bugfuzz.com \
--cc=samuel.thibault@ens-lyon.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.