xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] xenstat: fix unsigned less-than-0 comparison
@ 2014-05-04  8:31 Matthew Daley
  2014-05-04  8:31 ` [PATCH 2/2] xenstat: don't leak memory in getBridge Matthew Daley
  2014-05-05 14:32 ` [PATCH 1/2] xenstat: fix unsigned less-than-0 comparison Konrad Rzeszutek Wilk
  0 siblings, 2 replies; 4+ messages in thread
From: Matthew Daley @ 2014-05-04  8:31 UTC (permalink / raw)
  To: xen-devel
  Cc: xen-devel, Matthew Daley, Ian Jackson, Ian Campbell,
	Stefano Stabellini

Commit 1438d36f ("xenstat: Fix buffer over-run with new_domains being
negative.") attempted to fix the handling of a negative error result
from xc_domain_getinfolist in xenstat_get_node. However, it forgot to
change the result variable from an unsigned type to a signed one.

Do so, allowing the error result to be handled properly.

Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
---
 tools/xenstat/libxenstat/src/xenstat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/xenstat/libxenstat/src/xenstat.c b/tools/xenstat/libxenstat/src/xenstat.c
index e5facb8..8072a90 100644
--- a/tools/xenstat/libxenstat/src/xenstat.c
+++ b/tools/xenstat/libxenstat/src/xenstat.c
@@ -164,7 +164,7 @@ xenstat_node *xenstat_get_node(xenstat_handle * handle, unsigned int flags)
 	xenstat_node *node;
 	xc_physinfo_t physinfo = { 0 };
 	xc_domaininfo_t domaininfo[DOMAIN_CHUNK_SIZE];
-	unsigned int new_domains;
+	int new_domains;
 	unsigned int i;
 
 	/* Create the node */
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-05-08 10:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-04  8:31 [PATCH 1/2] xenstat: fix unsigned less-than-0 comparison Matthew Daley
2014-05-04  8:31 ` [PATCH 2/2] xenstat: don't leak memory in getBridge Matthew Daley
2014-05-05 14:32 ` [PATCH 1/2] xenstat: fix unsigned less-than-0 comparison Konrad Rzeszutek Wilk
2014-05-08 10:39   ` Ian Campbell

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).