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
c6b37e21
Kaydet (Commit)
c6b37e21
authored
Ock 14, 2014
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
merge 3.3 (#20246)
üst
e74f96de
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
0 deletions
+16
-0
test_socket.py
Lib/test/test_socket.py
+8
-0
ACKS
Misc/ACKS
+1
-0
NEWS
Misc/NEWS
+2
-0
socketmodule.c
Modules/socketmodule.c
+5
-0
No files found.
Lib/test/test_socket.py
Dosyayı görüntüle @
c6b37e21
...
...
@@ -4683,6 +4683,14 @@ class BufferIOTest(SocketConnectedTest):
_testRecvFromIntoMemoryview
=
_testRecvFromIntoArray
def
testRecvFromIntoSmallBuffer
(
self
):
# See issue #20246.
buf
=
bytearray
(
8
)
self
.
assertRaises
(
ValueError
,
self
.
cli_conn
.
recvfrom_into
,
buf
,
1024
)
def
_testRecvFromIntoSmallBuffer
(
self
):
self
.
serv_conn
.
send
(
MSG
*
2048
)
TIPC_STYPE
=
2000
TIPC_LOWER
=
200
...
...
Misc/ACKS
Dosyayı görüntüle @
c6b37e21
...
...
@@ -1218,6 +1218,7 @@ Eric V. Smith
Gregory P. Smith
Mark Smith
Roy Smith
Ryan Smith-Roberts
Rafal Smotrzyk
Eric Snow
Dirk Soede
...
...
Misc/NEWS
Dosyayı görüntüle @
c6b37e21
...
...
@@ -28,6 +28,8 @@ Library
- Issue #20242: Fixed basicConfig() format strings for the alternative
formatting styles. Thanks to kespindler for the bug report and patch.
- Issue #20246: Fix buffer overflow in socket.recvfrom_into.
- Issues #20206 and #5803: Fix edge case in email.quoprimime.encode where it
truncated lines ending in a character needing encoding but no newline by
using a more efficient algorithm that doesn'
t
have
the
bug
.
...
...
Modules/socketmodule.c
Dosyayı görüntüle @
c6b37e21
...
...
@@ -2875,6 +2875,11 @@ sock_recvfrom_into(PySocketSockObject *s, PyObject *args, PyObject* kwds)
if
(
recvlen
==
0
)
{
/* If nbytes was not specified, use the buffer's length */
recvlen
=
buflen
;
}
else
if
(
recvlen
>
buflen
)
{
PyBuffer_Release
(
&
pbuf
);
PyErr_SetString
(
PyExc_ValueError
,
"nbytes is greater than the length of the buffer"
);
return
NULL
;
}
readlen
=
sock_recvfrom_guts
(
s
,
buf
,
recvlen
,
flags
,
&
addr
);
...
...
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