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

[Xen-changelog] [xen master] xenstat: fix unsigned less-than-0 comparison



commit 261bf3449737728975a164d0ecde2f3105d2a3c1
Author:     Matthew Daley <mattd@xxxxxxxxxxx>
AuthorDate: Sun May 4 20:31:46 2014 +1200
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Thu May 8 10:48:15 2014 +0100

    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>
    Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/xenstat/libxenstat/src/xenstat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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 */
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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