Skip to contentSkip to conversation

xend: Fix parameters to PyArg_ParseTupleAndKeywords()

PATCH New KUWAMURA Shin'ya 1 participant 1 message Dec 4, 2009 Arm/actions semi architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xend: Fix parameters to PyArg_ParseTupleAndKeywords()

Hi,

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

Signature · 1 line
  KUWAMURA Shin'ya

# HG changeset patch
# User KUWAMURA Shin'ya <[email protected]> # 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.

tools/python/xen/lowlevel/xc/xc.c +2 -2
diff -r 0f35fb4f73d6 -r 23f5afd00f32 tools/python/xen/lowlevel/xc/xc.c
@@ -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
[email protected]
http://lists.xensource.com/xen-devel