Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c68e136

Browse files
committed
Fix unterminated keyword array passed to PyArg_ParseTupleAndKeywords
1 parent 2b88fcf commit c68e136

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/_elementtree.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,7 +1855,7 @@ treebuilder_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
18551855
static int
18561856
treebuilder_init(PyObject *self, PyObject *args, PyObject *kwds)
18571857
{
1858-
static char *kwlist[] = {"element_factory", NULL};
1858+
static char *kwlist[] = {"element_factory", 0};
18591859
PyObject *element_factory = NULL;
18601860
TreeBuilderObject *self_tb = (TreeBuilderObject *)self;
18611861

@@ -2762,7 +2762,7 @@ xmlparser_init(PyObject *self, PyObject *args, PyObject *kwds)
27622762
XMLParserObject *self_xp = (XMLParserObject *)self;
27632763
PyObject *target = NULL, *html = NULL;
27642764
char *encoding = NULL;
2765-
static char *kwlist[] = {"html", "target", "encoding"};
2765+
static char *kwlist[] = {"html", "target", "encoding", 0};
27662766

27672767
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OOz:XMLParser", kwlist,
27682768
&html, &target, &encoding)) {

0 commit comments

Comments
 (0)