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

Skip to content

Commit 6ca8a05

Browse files
committed
Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
CID 486199
1 parent 704e2d3 commit 6ca8a05

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
@@ -54,6 +54,8 @@ Core and Builtins
5454
Library
5555
-------
5656

57+
- Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
58+
5759
- Issue #18559: Fix NULL pointer dereference error in _pickle module
5860

5961
- Issue #18556: Check the return value of a PyUnicode_AsWideChar() call in

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)