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] xend: Fix parameters to PyArg_ParseTupleAndKeywords(

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xend: Fix parameters to PyArg_ParseTupleAndKeywords()
From: "KUWAMURA Shin'ya" <kuwa@xxxxxxxxxxxxxx>
Date: Fri, 04 Dec 2009 15:12:26 +0900 (JST)
Delivery-date: Thu, 03 Dec 2009 22:13:25 -0800
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
Hi,

The kwd_list parameter PyArg_ParseTupleAndKeywords() must be a
NULL-terminated list.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
-- 
  KUWAMURA Shin'ya
# HG changeset patch
# User KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
# Date 1259906503 -32400
# Node ID 23f5afd00f325d81f070fb98702bc344e5492048
# Parent  0f35fb4f73d6a2b58786868c9816f68399470e4c
xend: Fix parameters to PyArg_ParseTupleAndKeywords()

The kwd_list parameter PyArg_ParseTupleAndKeywords() must be a
NULL-terminated list.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>

diff -r 0f35fb4f73d6 -r 23f5afd00f32 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Thu Dec 03 13:52:02 2009 +0000
+++ b/tools/python/xen/lowlevel/xc/xc.c Fri Dec 04 15:01:43 2009 +0900
@@ -406,7 +406,7 @@ static PyObject *pyxc_getBitSize(XcObjec
     PyObject *info_type;
     char *image = NULL, *cmdline = "", *features = NULL;
     int type = 0;
-    static char *kwd_list[] = { "image", "cmdline", "features"};
+    static char *kwd_list[] = { "image", "cmdline", "features", NULL };
     if ( !PyArg_ParseTupleAndKeywords(args, kwds, "sss", kwd_list,
                                       &image, &cmdline, &features) )
         return NULL;
@@ -1642,7 +1642,7 @@ static PyObject *pyxc_tmem_shared_auth(X
     char *uuid_str;
     int rc;
 
-    static char *kwd_list[] = { "cli_id", "uuid_str", "arg1" };
+    static char *kwd_list[] = { "cli_id", "uuid_str", "arg1", NULL };
 
     if ( !PyArg_ParseTupleAndKeywords(args, kwds, "isi", kwd_list,
                                    &cli_id, &uuid_str, &arg1) )
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xend: Fix parameters to PyArg_ParseTupleAndKeywords(), KUWAMURA Shin'ya <=