mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fix sock_recvfrom_guts(): recvfrom() size is limited to an int on Windows, not
on other OSes!
This commit is contained in:
parent
3b5901143d
commit
e990c6e952
1 changed files with 8 additions and 8 deletions
|
@ -2833,7 +2833,7 @@ sock_recvfrom_guts(PySocketSockObject *s, char* cbuf, Py_ssize_t len, int flags,
|
||||||
memset(&addrbuf, 0, addrlen);
|
memset(&addrbuf, 0, addrlen);
|
||||||
timeout = internal_select_ex(s, 0, interval);
|
timeout = internal_select_ex(s, 0, interval);
|
||||||
if (!timeout) {
|
if (!timeout) {
|
||||||
#ifndef MS_WINDOWS
|
#ifdef MS_WINDOWS
|
||||||
if (len > INT_MAX)
|
if (len > INT_MAX)
|
||||||
len = INT_MAX;
|
len = INT_MAX;
|
||||||
n = recvfrom(s->sock_fd, cbuf, (int)len, flags,
|
n = recvfrom(s->sock_fd, cbuf, (int)len, flags,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue