|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-changelog
[Xen-changelog] The xc_domain_getinfo does not clear the info	structure 
 
ChangeSet 1.1730, 2005/06/23 10:15:41+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx
        The xc_domain_getinfo does not clear the info structure before filling 
        it in, and in some circumstances it doesn't completely fill in the 
        structure for each domain.  In particular, it sets the crashed flag if 
        the domain has crashed, but does not clear it if the domain has not 
        crashed, so the crashed flag may be random stack garbage from the 
        calling program.  With the attached patch (against the latest nightly), 
        xc_domain_getinfo zeroes the array of info structures before filling 
        them in.
        
        Signed-off-by: Josh Triplett <josht@xxxxxxxxxx>
 xc_domain.c |    2 ++
 1 files changed, 2 insertions(+)
diff -Nru a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   2005-06-23 07:05:28 -04:00
+++ b/tools/libxc/xc_domain.c   2005-06-23 07:05:28 -04:00
@@ -79,6 +79,8 @@
     dom0_op_t op;
     int rc = 0; 
 
+    memset(info, 0, max_doms*sizeof(xc_dominfo_t));
+
     for ( nr_doms = 0; nr_doms < max_doms; nr_doms++ )
     {
         op.cmd = DOM0_GETDOMAININFO;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
 |   
 
| <Prev in Thread] | 
Current Thread | 
[Next in Thread> |  
- [Xen-changelog] The xc_domain_getinfo does not clear the info	structure before filling,
BitKeeper Bot <=
  
 |  
  
 | 
    | 
  
  
    |   | 
    |