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

[Xen-devel] [PATCH] wild pointer in xenstat.c


  • To: "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Charles Coffing" <ccoffing@xxxxxxxxxx>
  • Date: Mon, 31 Oct 2005 13:18:02 -0700
  • Delivery-date: Mon, 31 Oct 2005 20:58:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

There is an error in xenstat, such that a wild pointer is being
dereferenced and written to.

Signed-off-by:  Charles Coffing <ccoffing@xxxxxxxxxx>


--- xen-unstable.orig/tools/xenstat/libxenstat/src/xenstat.c
+++ xen-unstable/tools/xenstat/libxenstat/src/xenstat.c
@@ -704,7 +704,7 @@ static char *xenstat_get_domain_name(xen
 {
        char path[80];
        char *name;
-       unsigned int *len;
+       unsigned int len;
        struct xs_transaction_handle *xstranshandle;

        snprintf(path, sizeof(path),"/local/domain/%i/name",
domain_id);
@@ -715,7 +715,7 @@ static char *xenstat_get_domain_name(xen
                exit(1); /* Change this */
        }

-       name = (char *) xs_read(handle->xshandle, xstranshandle, path,
len);
+       name = (char *) xs_read(handle->xshandle, xstranshandle, path,
&len);

        xs_transaction_end(handle->xshandle, xstranshandle, false);



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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