xend: Fix parameters to PyArg_ParseTupleAndKeywords()
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 4 Dec 2009 07:00:25 +0000 (07:00 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 4 Dec 2009 07:00:25 +0000 (07:00 +0000)
The kwd_list parameter PyArg_ParseTupleAndKeywords() must be a
NULL-terminated list.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
tools/python/xen/lowlevel/xc/xc.c

index 7ad2871765b8d5c87e1b181c5c7a333088513a53..83096048cd3f0d670e72c642f7294e68921044d0 100644 (file)
@@ -406,7 +406,7 @@ static PyObject *pyxc_getBitSize(XcObject *self,
     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(XcObject *self,
     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) )