From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
Ross Lagerwall <ross.lagerwall@citrix.com>,
Wei Liu <wei.liu2@citrix.com>
Subject: [PATCH for-4.7] tools: xen-xsplice.c: fix length parameter of memset in list_func
Date: Sun, 1 May 2016 19:21:45 +0100 [thread overview]
Message-ID: <1462126905-25299-1-git-send-email-wei.liu2@citrix.com> (raw)
The length expression should be the same one used in malloc.
CID: 1358947
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ross Lagerwall <ross.lagerwall@citrix.com>
---
tools/misc/xen-xsplice.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c
index 0f1ab5a..b3bf048 100644
--- a/tools/misc/xen-xsplice.c
+++ b/tools/misc/xen-xsplice.c
@@ -95,7 +95,7 @@ static int list_func(int argc, char *argv[])
done = 0;
/* The memset is done to catch errors. */
memset(info, 'A', sizeof(*info) * MAX_LEN);
- memset(name, 'B', sizeof(*name * MAX_LEN * XEN_XSPLICE_NAME_SIZE));
+ memset(name, 'B', sizeof(*name) * MAX_LEN * XEN_XSPLICE_NAME_SIZE);
memset(len, 'C', sizeof(*len) * MAX_LEN);
rc = xc_xsplice_list(xch, MAX_LEN, idx, info, name, len, &done, &left);
if ( rc )
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next reply other threads:[~2016-05-01 18:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-01 18:21 Wei Liu [this message]
2016-05-02 0:42 ` [PATCH for-4.7] tools: xen-xsplice.c: fix length parameter of memset in list_func Konrad Rzeszutek Wilk
2016-05-02 9:14 ` Wei Liu
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=1462126905-25299-1-git-send-email-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=ross.lagerwall@citrix.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).