]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38622: Ensure ctypes.PyObj_FromPtr audit event passes tuples as a single argument...
authorSteve Dower <steve.dower@python.org>
Mon, 18 Nov 2019 21:30:01 +0000 (13:30 -0800)
committerGitHub <noreply@github.com>
Mon, 18 Nov 2019 21:30:01 +0000 (13:30 -0800)
Modules/_ctypes/callproc.c

index 71060148d6651ece143ccbe3ae7beb7226de513f..7b13fa041a205c542e729b1f0dd4723a8a9f1463 100644 (file)
@@ -1631,7 +1631,7 @@ addressof(PyObject *self, PyObject *obj)
                         "invalid type");
         return NULL;
     }
-    if (PySys_Audit("ctypes.addressof", "O", obj) < 0) {
+    if (PySys_Audit("ctypes.addressof", "(O)", obj) < 0) {
         return NULL;
     }
     return PyLong_FromVoidPtr(((CDataObject *)obj)->b_ptr);
@@ -1651,7 +1651,7 @@ My_PyObj_FromPtr(PyObject *self, PyObject *args)
     if (!PyArg_ParseTuple(args, "O&:PyObj_FromPtr", converter, &ob)) {
         return NULL;
     }
-    if (PySys_Audit("ctypes.PyObj_FromPtr", "O", ob) < 0) {
+    if (PySys_Audit("ctypes.PyObj_FromPtr", "(O)", ob) < 0) {
         return NULL;
     }
     Py_INCREF(ob);