diff options
author | Oren Milman <orenmn@gmail.com> | 2017-08-20 15:35:36 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-08-20 15:35:36 (GMT) |
commit | 1d1d3e9db882d78433f5bc8dbe7df929f4b6b5e1 (patch) | |
tree | b5d3ee0a0aba15a2586c4e891630554dd702e933 /Modules/overlapped.c | |
parent | 4bfebc63012f0f4e00f6a98c3d96e1c0ebe93408 (diff) | |
download | cpython-1d1d3e9db882d78433f5bc8dbe7df929f4b6b5e1.zip cpython-1d1d3e9db882d78433f5bc8dbe7df929f4b6b5e1.tar.gz cpython-1d1d3e9db882d78433f5bc8dbe7df929f4b6b5e1.tar.bz2 |
bpo-28261: Fixed err msgs where PyArg_ParseTuple is used to parse normal tuples. (#3119)
Diffstat (limited to 'Modules/overlapped.c')
-rw-r--r-- | Modules/overlapped.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/overlapped.c b/Modules/overlapped.c index 4390e9a..6099d46 100644 --- a/Modules/overlapped.c +++ b/Modules/overlapped.c @@ -990,7 +990,9 @@ parse_address(PyObject *obj, SOCKADDR *Address, int Length) ((SOCKADDR_IN*)Address)->sin_port = htons(Port); return Length; } - else if (PyArg_ParseTuple(obj, "uHkk", &Host, &Port, &FlowInfo, &ScopeId)) + else if (PyArg_ParseTuple(obj, + "uHkk;ConnectEx(): illegal address_as_bytes " + "argument", &Host, &Port, &FlowInfo, &ScopeId)) { PyErr_Clear(); Address->sa_family = AF_INET6; @@ -1024,8 +1026,11 @@ Overlapped_ConnectEx(OverlappedObject *self, PyObject *args) BOOL ret; DWORD err; - if (!PyArg_ParseTuple(args, F_HANDLE "O", &ConnectSocket, &AddressObj)) + if (!PyArg_ParseTuple(args, F_HANDLE "O!:ConnectEx", + &ConnectSocket, &PyTuple_Type, &AddressObj)) + { return NULL; + } if (self->type != TYPE_NONE) { PyErr_SetString(PyExc_ValueError, "operation already attempted"); |