Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
e990c6e9
Kaydet (Commit)
e990c6e9
authored
Kas 15, 2013
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix sock_recvfrom_guts(): recvfrom() size is limited to an int on Windows, not
on other OSes!
üst
3b590114
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
socketmodule.c
Modules/socketmodule.c
+8
-8
No files found.
Modules/socketmodule.c
Dosyayı görüntüle @
e990c6e9
...
...
@@ -840,7 +840,7 @@ setipaddr(char *name, struct sockaddr *addr_ret, size_t addr_ret_size, int af)
return
siz
;
}
/* special-case broadcast - inet_addr() below can return INADDR_NONE for
* this */
* this */
if
(
strcmp
(
name
,
"255.255.255.255"
)
==
0
||
strcmp
(
name
,
"<broadcast>"
)
==
0
)
{
struct
sockaddr_in
*
sin
;
...
...
@@ -901,7 +901,7 @@ setipaddr(char *name, struct sockaddr *addr_ret, size_t addr_ret_size, int af)
#endif
return
4
;
}
}
}
#endif
/* HAVE_INET_PTON */
/* perform a name resolution */
...
...
@@ -2833,7 +2833,7 @@ sock_recvfrom_guts(PySocketSockObject *s, char* cbuf, Py_ssize_t len, int flags,
memset
(
&
addrbuf
,
0
,
addrlen
);
timeout
=
internal_select_ex
(
s
,
0
,
interval
);
if
(
!
timeout
)
{
#if
n
def MS_WINDOWS
#ifdef MS_WINDOWS
if
(
len
>
INT_MAX
)
len
=
INT_MAX
;
n
=
recvfrom
(
s
->
sock_fd
,
cbuf
,
(
int
)
len
,
flags
,
...
...
@@ -4702,7 +4702,7 @@ socket_dup(PyObject *self, PyObject *fdobj)
/* On UNIX, dup can be used to duplicate the file descriptor of a socket */
newfd
=
_Py_dup
(
fd
);
if
(
newfd
==
INVALID_SOCKET
)
return
NULL
;
return
NULL
;
#endif
newfdobj
=
PyLong_FromSocket_t
(
newfd
);
...
...
@@ -5093,7 +5093,7 @@ socket_inet_pton(PyObject *self, PyObject *args)
return
NULL
;
}
size
=
sizeof
(
addr
);
size
=
sizeof
(
addr
);
ret
=
WSAStringToAddressA
(
ip
,
af
,
NULL
,
(
LPSOCKADDR
)
&
addr
,
&
size
);
if
(
ret
)
{
...
...
@@ -5101,10 +5101,10 @@ socket_inet_pton(PyObject *self, PyObject *args)
return
NULL
;
}
else
if
(
af
==
AF_INET
)
{
struct
sockaddr_in
*
addr4
=
(
struct
sockaddr_in
*
)
&
addr
;
return
PyBytes_FromStringAndSize
((
const
char
*
)
&
(
addr4
->
sin_addr
),
return
PyBytes_FromStringAndSize
((
const
char
*
)
&
(
addr4
->
sin_addr
),
sizeof
(
addr4
->
sin_addr
));
}
else
if
(
af
==
AF_INET6
)
{
return
PyBytes_FromStringAndSize
((
const
char
*
)
&
(
addr
.
sin6_addr
),
return
PyBytes_FromStringAndSize
((
const
char
*
)
&
(
addr
.
sin6_addr
),
sizeof
(
addr
.
sin6_addr
));
}
else
{
PyErr_SetString
(
PyExc_OSError
,
"unknown address family"
);
...
...
@@ -5231,7 +5231,7 @@ socket_inet_ntop(PyObject *self, PyObject *args)
}
retlen
=
sizeof
(
ip
);
ret
=
WSAAddressToStringA
((
struct
sockaddr
*
)
&
addr
,
addrlen
,
NULL
,
ret
=
WSAAddressToStringA
((
struct
sockaddr
*
)
&
addr
,
addrlen
,
NULL
,
ip
,
&
retlen
);
if
(
ret
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment