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

Skip to content

Commit f6e7e36

Browse files
committed
Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
CID 486199
2 parents 4ebf6d7 + 6ca8a05 commit f6e7e36

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ Core and Builtins
168168
Library
169169
-------
170170

171+
- Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
172+
171173
- Issue #18559: Fix NULL pointer dereference error in _pickle module
172174

173175
- Issue #18556: Check the return type of PyUnicode_AsWideChar() in ctype's

Modules/_ctypes/_ctypes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3453,7 +3453,7 @@ _get_arg(int *pindex, PyObject *name, PyObject *defval, PyObject *inargs, PyObje
34533453
Py_INCREF(v);
34543454
return v;
34553455
}
3456-
if (kwds && (v = PyDict_GetItem(kwds, name))) {
3456+
if (kwds && name && (v = PyDict_GetItem(kwds, name))) {
34573457
++*pindex;
34583458
Py_INCREF(v);
34593459
return v;

0 commit comments

Comments
 (0)