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] python/xc: fix out of bounds array access

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] python/xc: fix out of bounds array access
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 15 Jun 2010 13:22:04 +0100
Delivery-date: Tue, 15 Jun 2010 05:24:53 -0700
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Writing a NUL terminator here isn't even necessary, since snprintf()
already guarantees proper termination.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- 2010-06-15.orig/tools/python/xen/lowlevel/xc/xc.c   2010-06-01 
13:39:57.000000000 +0200
+++ 2010-06-15/tools/python/xen/lowlevel/xc/xc.c        2010-06-15 
10:55:11.000000000 +0200
@@ -58,7 +58,6 @@ static PyObject *pyxc_error_to_exception
         snprintf(err_buf.message, sizeof(err_buf.message),
                  "xc_interface_open failed: %s",
                  strerror(errno));
-        err_buf.message[sizeof(err_buf)-1] = 0;
         err_buf.code = XC_INTERNAL_ERROR;
         err = &err_buf;
     }



Attachment: pyxc-array-bounds.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] python/xc: fix out of bounds array access, Jan Beulich <=