mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.11] gh-114077: Fix OverflowError in socket.sendfile() when pass count >2GiB (GH-114079) (GH-114111)
(cherry picked from commit d4dfad2aa9
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
f5cbed1114
commit
0e92265875
2 changed files with 3 additions and 1 deletions
|
@ -381,7 +381,7 @@ class socket(_socket.socket):
|
|||
if timeout and not selector_select(timeout):
|
||||
raise TimeoutError('timed out')
|
||||
if count:
|
||||
blocksize = count - total_sent
|
||||
blocksize = min(count - total_sent, blocksize)
|
||||
if blocksize <= 0:
|
||||
break
|
||||
try:
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Fix possible :exc:`OverflowError` in :meth:`socket.socket.sendfile` when pass
|
||||
*count* larger than 2 GiB on 32-bit platform.
|
Loading…
Add table
Add a link
Reference in a new issue