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

[Xen-changelog] [xen master] tools: xen-xsplice.c: fix length parameter of memset in list_func



commit 7f62212d992fb8ae600faf6009475692a025bf99
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Sun May 1 19:21:45 2016 +0100
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Mon May 2 10:21:35 2016 +0100

    tools: xen-xsplice.c: fix length parameter of memset in list_func
    
    The length expression should be the same one used in malloc.
    
    CID: 1358947
    
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
    Release-acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 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 )
--
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®.