summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-03-20 13:39:53 (GMT)
committerGitHub <noreply@github.com>2024-03-20 13:39:53 (GMT)
commit519b2ae22b54760475bbf62b9558d453c703f9c6 (patch)
tree321cae36795eabe4bad66ca58a1f804c956e38d2 /Modules/_testcapimodule.c
parent8182319de33a9519a2f243ac8c35a20ef82a4d2d (diff)
downloadcpython-519b2ae22b54760475bbf62b9558d453c703f9c6.zip
cpython-519b2ae22b54760475bbf62b9558d453c703f9c6.tar.gz
cpython-519b2ae22b54760475bbf62b9558d453c703f9c6.tar.bz2
gh-117021: Fix integer overflow in PyLong_AsPid() on non-Windows 64-bit platforms (GH-117064)
Diffstat (limited to 'Modules/_testcapimodule.c')
-rw-r--r--Modules/_testcapimodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 9621c65..b73085b 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -3975,6 +3975,7 @@ PyInit__testcapi(void)
PyModule_AddObject(m, "SIZEOF_WCHAR_T", PyLong_FromSsize_t(sizeof(wchar_t)));
PyModule_AddObject(m, "SIZEOF_VOID_P", PyLong_FromSsize_t(sizeof(void*)));
PyModule_AddObject(m, "SIZEOF_TIME_T", PyLong_FromSsize_t(sizeof(time_t)));
+ PyModule_AddObject(m, "SIZEOF_PID_T", PyLong_FromSsize_t(sizeof(pid_t)));
PyModule_AddObject(m, "Py_Version", PyLong_FromUnsignedLong(Py_Version));
Py_INCREF(&PyInstanceMethod_Type);
PyModule_AddObject(m, "instancemethod", (PyObject *)&PyInstanceMethod_Type);