diff options
author | Christian Heimes <christian@cheimes.de> | 2013-07-26 21:04:39 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-07-26 21:04:39 (GMT) |
commit | f6e7e36c3d3ffa0c537a30253488fca4464ed409 (patch) | |
tree | 005e3dc64fcdb63869f09f0de42c307e3f321381 | |
parent | 4ebf6d7c3c2a0b04dd815c0b042294e36d644954 (diff) | |
parent | 6ca8a05f10b37e068f7c7da196d0d97706b6f15f (diff) | |
download | cpython-f6e7e36c3d3ffa0c537a30253488fca4464ed409.zip cpython-f6e7e36c3d3ffa0c537a30253488fca4464ed409.tar.gz cpython-f6e7e36c3d3ffa0c537a30253488fca4464ed409.tar.bz2 |
Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
CID 486199
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -168,6 +168,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 type of PyUnicode_AsWideChar() in ctype's diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 6f40b1a..7c34f77 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -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; |