tools: xen-xsplice.c: fix length parameter of memset in list_func
PATCH 1/1 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
---
Cc: Ian Jackson <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Ross Lagerwall <[email protected]>
--- tools/misc/xen-xsplice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/misc/xen-xsplice.c +1 -1
@@ -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 )
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 8 lines · Wei Liu
The length expression should be the same one used in malloc.
CID: 1358947
Signed-off-by Wei Liu <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Quoted 21 lines
Cc Ross Lagerwall <[email protected]>--- tools/misc/xen-xsplice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/misc/xen-xsplice.c +1
-1@@ -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 )Signature · 1 line
2.1.4
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 12 lines · Konrad Rzeszutek Wilk
Quoted 8 lines · Wei Liu
The length expression should be the same one used in malloc.
CID: 1358947
Signed-off-by Wei Liu <[email protected]>---
Cc: Ian Jackson <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>Reviewed-by Konrad Rzeszutek Wilk <[email protected]>
Thanks for the quick response.
Queued.
Quoted 5 lines
Quoted 5 lines
Cc Ross Lagerwall <[email protected]>--- tools/misc/xen-xsplice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
Quoted 16 lines
tools/misc/xen-xsplice.c +1
-1@@ -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 )Signature · 1 line
2.1.4
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel