Skip to content

Commit dcf1f83

Browse files
authored
bpo-38622: Ensure ctypes.PyObj_FromPtr audit event passes tuples as a single argument (GH-17243)
1 parent 00923c6 commit dcf1f83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_ctypes/callproc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ addressof(PyObject *self, PyObject *obj)
16311631
"invalid type");
16321632
return NULL;
16331633
}
1634-
if (PySys_Audit("ctypes.addressof", "O", obj) < 0) {
1634+
if (PySys_Audit("ctypes.addressof", "(O)", obj) < 0) {
16351635
return NULL;
16361636
}
16371637
return PyLong_FromVoidPtr(((CDataObject *)obj)->b_ptr);
@@ -1651,7 +1651,7 @@ My_PyObj_FromPtr(PyObject *self, PyObject *args)
16511651
if (!PyArg_ParseTuple(args, "O&:PyObj_FromPtr", converter, &ob)) {
16521652
return NULL;
16531653
}
1654-
if (PySys_Audit("ctypes.PyObj_FromPtr", "O", ob) < 0) {
1654+
if (PySys_Audit("ctypes.PyObj_FromPtr", "(O)", ob) < 0) {
16551655
return NULL;
16561656
}
16571657
Py_INCREF(ob);

0 commit comments

Comments
 (0)