[Python-checkins] cpython (merge 3.3 -> default): Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.

christian.heimes python-checkins at python.org
Fri Jul 26 23:04:53 CEST 2013


http://hg.python.org/cpython/rev/d543829eda7d
changeset:   84849:d543829eda7d
parent:      84847:a5d9e2f3f6c7
parent:      84848:57457028dd7a
user:        Christian Heimes <christian at cheimes.de>
date:        Fri Jul 26 23:04:39 2013 +0200
summary:
  Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
CID 486199

files:
  Misc/NEWS                 |  2 ++
  Modules/_ctypes/_ctypes.c |  2 +-
  2 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -168,6 +168,8 @@
 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
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -3453,7 +3453,7 @@
         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;

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list