summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-03-20 14:44:05 (GMT)
committerGitHub <noreply@github.com>2024-03-20 14:44:05 (GMT)
commitda2f9d1417a7d28df6e1ced87d64ecf28acb0a5f (patch)
tree9b1c411e9c5ba14971109cc512c10dcdde2bcd5a /Modules/_testcapimodule.c
parent0325a8a8cdba6c091bcbbb3c995f3bf1d1217012 (diff)
downloadcpython-da2f9d1417a7d28df6e1ced87d64ecf28acb0a5f.zip
cpython-da2f9d1417a7d28df6e1ced87d64ecf28acb0a5f.tar.gz
cpython-da2f9d1417a7d28df6e1ced87d64ecf28acb0a5f.tar.bz2
[3.12] gh-117021: Fix integer overflow in PyLong_AsPid() on non-Windows 64-bit platforms (GH-117064) (GH-117070)
(cherry picked from commit 519b2ae22b54760475bbf62b9558d453c703f9c6)
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 48c8f92..e906658 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -3986,6 +3986,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);