WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] wild pointer in xenstat.c
From: "Charles Coffing" <ccoffing@xxxxxxxxxx>
Date: Mon, 31 Oct 2005 13:18:02 -0700
Delivery-date: Mon, 31 Oct 2005 20:58:13 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] wild pointer in xenstat.c, Charles Coffing <=