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

Re: [Xen-devel] [PATCH for-4.7] tools: xen-xsplice.c: fix length parameter of memset in list_func



On Sun, May 01, 2016 at 07:21:45PM +0100, Wei Liu wrote:
> The length expression should be the same one used in malloc.
> 
> CID: 1358947
> 
> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> ---
> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>

> Cc: Ross Lagerwall <ross.lagerwall@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 )
> -- 
> 2.1.4
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.