summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/overlapped.c.h
diff options
context:
space:
mode:
authorCharlie Zhao <zhaoyu_hit@qq.com>2022-10-30 04:34:46 (GMT)
committerGitHub <noreply@github.com>2022-10-30 04:34:46 (GMT)
commit3ac8c0ab6ee819a14b1c8e0992acbaf376a46058 (patch)
tree79d77067debcba2cbcbdb370d478e3faad05c136 /Modules/clinic/overlapped.c.h
parentfc94d55ff453a3101e4c00a394d4e38ae2fece13 (diff)
downloadcpython-3ac8c0ab6ee819a14b1c8e0992acbaf376a46058.zip
cpython-3ac8c0ab6ee819a14b1c8e0992acbaf376a46058.tar.gz
cpython-3ac8c0ab6ee819a14b1c8e0992acbaf376a46058.tar.bz2
gh-98793: Fix typecheck in `overlapped.c` (#98835)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Diffstat (limited to 'Modules/clinic/overlapped.c.h')
-rw-r--r--Modules/clinic/overlapped.c.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/Modules/clinic/overlapped.c.h b/Modules/clinic/overlapped.c.h
index e8c2fe5..9d9f2cb 100644
--- a/Modules/clinic/overlapped.c.h
+++ b/Modules/clinic/overlapped.c.h
@@ -1093,6 +1093,10 @@ _overlapped_WSAConnect(PyObject *module, PyObject *const *args, Py_ssize_t nargs
if (!ConnectSocket && PyErr_Occurred()) {
goto exit;
}
+ if (!PyTuple_Check(args[1])) {
+ _PyArg_BadArgument("WSAConnect", "argument 2", "tuple", args[1]);
+ goto exit;
+ }
AddressObj = args[1];
return_value = _overlapped_WSAConnect_impl(module, ConnectSocket, AddressObj);
@@ -1140,6 +1144,10 @@ _overlapped_Overlapped_WSASendTo(OverlappedObject *self, PyObject *const *args,
if (!_PyLong_UnsignedLong_Converter(args[2], &flags)) {
goto exit;
}
+ if (!PyTuple_Check(args[3])) {
+ _PyArg_BadArgument("WSASendTo", "argument 4", "tuple", args[3]);
+ goto exit;
+ }
AddressObj = args[3];
return_value = _overlapped_Overlapped_WSASendTo_impl(self, handle, &bufobj, flags, AddressObj);
@@ -1254,4 +1262,4 @@ exit:
return return_value;
}
-/*[clinic end generated code: output=e0f866222bd5873b input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b2e89694b8de3d00 input=a9049054013a1b77]*/