]> granicus.if.org Git - python/commitdiff
Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
authorChristian Heimes <christian@cheimes.de>
Fri, 26 Jul 2013 21:04:29 +0000 (23:04 +0200)
committerChristian Heimes <christian@cheimes.de>
Fri, 26 Jul 2013 21:04:29 +0000 (23:04 +0200)
CID 486199

Misc/NEWS
Modules/_ctypes/_ctypes.c

index 505fab58209fb58b526f4d1da7c9291fc25794ae..769b80e73076a6ffb0419ace7120fa2ae558514e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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
index a025a732f6d0180953ce05d4fce50fe6f9a56d02..9a37aacf0cbc0c2286eefcd218527e5f7b3267fb 100644 (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;