Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.

CID 486199
This commit is contained in:
Christian Heimes 2013-07-26 23:04:29 +02:00
parent 704e2d374f
commit 6ca8a05f10
2 changed files with 3 additions and 1 deletions

View File

@ -54,6 +54,8 @@ Core and Builtins
Library
-------
- Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
- Issue #18559: Fix NULL pointer dereference error in _pickle module
- Issue #18556: Check the return value of a PyUnicode_AsWideChar() call in

View File

@ -3453,7 +3453,7 @@ _get_arg(int *pindex, PyObject *name, PyObject *defval, PyObject *inargs, PyObje
Py_INCREF(v);
return v;
}
if (kwds && (v = PyDict_GetItem(kwds, name))) {
if (kwds && name && (v = PyDict_GetItem(kwds, name))) {
++*pindex;
Py_INCREF(v);
return v;