summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authortkmikan <36260601+tkmikan@users.noreply.github.com>2020-07-03 20:56:30 (GMT)
committerGitHub <noreply@github.com>2020-07-03 20:56:30 (GMT)
commitd160e0f8e283d0a8737644588b38e8c6a07c134f (patch)
tree51c927d2d879fe4dbdb537118460f490dd437d2f /Python
parentb1cc6ba73a51d5cc3aeb113b5e7378fb50a0e20a (diff)
downloadcpython-d160e0f8e283d0a8737644588b38e8c6a07c134f.zip
cpython-d160e0f8e283d0a8737644588b38e8c6a07c134f.tar.gz
cpython-d160e0f8e283d0a8737644588b38e8c6a07c134f.tar.bz2
bpo-41180: Audit code.__new__ when unmarshalling (GH-21271)
Diffstat (limited to 'Python')
-rw-r--r--Python/marshal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index a0f6b98..c4538bd 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -1371,6 +1371,12 @@ r_object(RFILE *p)
if (lnotab == NULL)
goto code_error;
+ if (PySys_Audit("code.__new__", "OOOiiiiii",
+ code, filename, name, argcount, posonlyargcount,
+ kwonlyargcount, nlocals, stacksize, flags) < 0) {
+ goto code_error;
+ }
+
v = (PyObject *) PyCode_NewWithPosOnlyArgs(
argcount, posonlyargcount, kwonlyargcount,
nlocals, stacksize, flags,