* [PATCH for-4.7] tools: xen-xsplice.c: fix length parameter of memset in list_func
@ 2016-05-01 18:21 Wei Liu
2016-05-02 0:42 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 3+ messages in thread
From: Wei Liu @ 2016-05-01 18:21 UTC (permalink / raw)
To: Xen-devel; +Cc: Ian Jackson, Ross Lagerwall, Wei Liu
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH for-4.7] tools: xen-xsplice.c: fix length parameter of memset in list_func
2016-05-01 18:21 [PATCH for-4.7] tools: xen-xsplice.c: fix length parameter of memset in list_func Wei Liu
@ 2016-05-02 0:42 ` Konrad Rzeszutek Wilk
2016-05-02 9:14 ` Wei Liu
0 siblings, 1 reply; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-05-02 0:42 UTC (permalink / raw)
To: Wei Liu; +Cc: Xen-devel, Ian Jackson, Ross Lagerwall
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@citrix.com>
> ---
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH for-4.7] tools: xen-xsplice.c: fix length parameter of memset in list_func
2016-05-02 0:42 ` Konrad Rzeszutek Wilk
@ 2016-05-02 9:14 ` Wei Liu
0 siblings, 0 replies; 3+ messages in thread
From: Wei Liu @ 2016-05-02 9:14 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: Xen-devel, Wei Liu, Ian Jackson, Ross Lagerwall
On Sun, May 01, 2016 at 08:42:56PM -0400, Konrad Rzeszutek Wilk wrote:
> 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@citrix.com>
> > ---
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>
Thanks for the quick response.
Queued.
> > 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-02 9:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-01 18:21 [PATCH for-4.7] tools: xen-xsplice.c: fix length parameter of memset in list_func Wei Liu
2016-05-02 0:42 ` Konrad Rzeszutek Wilk
2016-05-02 9:14 ` Wei Liu
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).