Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4807df41
Commit
4807df41
authored
Jun 23, 2013
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #18135: Fix a possible integer overflow in ssl.SSLSocket.write()
for strings longer than 2 gigabytes.
parent
76038810
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
Misc/NEWS
Misc/NEWS
+3
-0
Modules/_ssl.c
Modules/_ssl.c
+6
-1
No files found.
Misc/NEWS
View file @
4807df41
...
...
@@ -21,6 +21,9 @@ Core and Builtins
Library
-------
- Issue #18135: Fix a possible integer overflow in ssl.SSLSocket.write()
for strings longer than 2 gigabytes.
- Issue #18167: cgi.FieldStorage no more fails to handle multipart/form-data
when \r\n appears at end of 65535 bytes without other newlines.
...
...
Modules/_ssl.c
View file @
4807df41
...
...
@@ -1212,8 +1212,13 @@ static PyObject *PySSL_SSLwrite(PySSLObject *self, PyObject *args)
goto
error
;
}
do
{
if
(
buf
.
len
<=
INT_MAX
)
len
=
(
int
)
buf
.
len
;
else
len
=
INT_MAX
;
PySSL_BEGIN_ALLOW_THREADS
len
=
SSL_write
(
self
->
ssl
,
buf
.
buf
,
buf
.
len
);
len
=
SSL_write
(
self
->
ssl
,
buf
.
buf
,
len
);
err
=
SSL_get_error
(
self
->
ssl
,
len
);
PySSL_END_ALLOW_THREADS
if
(
PyErr_CheckSignals
())
{
...
...
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