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 1 of 4] Fix off-by-one preventing the last elfnote fr

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1 of 4] Fix off-by-one preventing the last elfnote from being read in xc.c
From: Brendan Cully <brendan@xxxxxxxxx>
Date: Tue, 27 Feb 2007 22:38:20 -0800
Delivery-date: Tue, 27 Feb 2007 22:40:26 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1172644699@xxxxxxxxxxxxxxxxx>
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
# HG changeset patch
# User Brendan Cully <brendan@xxxxxxxxx>
# Date 1172644688 28800
# Node ID a7afd4050ce3201044ac8fec1b4469d758a0fc80
# Parent  1c5e6239a8d0381fdbf56d4926f986d7f0ec07c0
Fix off-by-one preventing the last elfnote from being read in xc.c.

Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>

diff -r 1c5e6239a8d0 -r a7afd4050ce3 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Sun Feb 25 23:58:33 2007 -0600
+++ b/tools/python/xen/lowlevel/xc/xc.c Tue Feb 27 22:38:08 2007 -0800
@@ -411,7 +411,7 @@ static PyObject *pyxc_linux_build(XcObje
 
     if (!(elfnote_dict = PyDict_New()))
        goto out;
-    for (i = 0; i < XEN_ELFNOTE_MAX; i++) {
+    for (i = 0; i <= XEN_ELFNOTE_MAX; i++) {
        switch (dom->parms.elf_notes[i].type) {
        case XEN_ENT_NONE:
            continue;

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