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

[Xen-devel] [PATCH 1/2] xenstat: fix unsigned less-than-0 comparison



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@xxxxxxxxxxx>
---
 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


_______________________________________________
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®.