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
0c2ff089
Kaydet (Commit)
0c2ff089
authored
May 02, 2017
tarafından
Antoine Pitrou
Kaydeden (comit)
GitHub
May 02, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Backport bpo-30205 to 3.6 (#1403)
üst
4dae0d11
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
test_socket.py
Lib/test/test_socket.py
+4
-0
NEWS
Misc/NEWS
+2
-0
socketmodule.c
Modules/socketmodule.c
+3
-3
No files found.
Lib/test/test_socket.py
Dosyayı görüntüle @
0c2ff089
...
...
@@ -4660,6 +4660,10 @@ class TestUnixDomain(unittest.TestCase):
else
:
raise
def
testUnbound
(
self
):
# Issue #30205
self
.
assertIn
(
self
.
sock
.
getsockname
(),
(
''
,
None
))
def
testStrAddr
(
self
):
# Test binding to and retrieving a normal string pathname.
path
=
os
.
path
.
abspath
(
support
.
TESTFN
)
...
...
Misc/NEWS
Dosyayı görüntüle @
0c2ff089
...
...
@@ -36,6 +36,8 @@ Core and Builtins
Library
-------
- bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux.
- bpo-30070: Fixed leaks and crashes in errors handling in the parser module.
- bpo-30061: Fixed crashes in IOBase methods __next__() and readlines() when
...
...
Modules/socketmodule.c
Dosyayı görüntüle @
0c2ff089
...
...
@@ -1212,9 +1212,9 @@ makesockaddr(SOCKET_T sockfd, struct sockaddr *addr, size_t addrlen, int proto)
{
struct
sockaddr_un
*
a
=
(
struct
sockaddr_un
*
)
addr
;
#ifdef __linux__
if
(
a
->
sun_path
[
0
]
==
0
)
{
/* Linux abstract namespace */
addrlen
-=
offsetof
(
struct
sockaddr_un
,
sun_path
);
return
PyBytes_FromStringAndSize
(
a
->
sun_path
,
addrlen
);
size_t
linuxaddrlen
=
addrlen
-
offsetof
(
struct
sockaddr_un
,
sun_path
);
if
(
linuxaddrlen
>
0
&&
a
->
sun_path
[
0
]
==
0
)
{
/* Linux abstract namespace */
return
PyBytes_FromStringAndSize
(
a
->
sun_path
,
linux
addrlen
);
}
else
#endif
/* linux */
...
...
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