Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
044e733a
Commit
044e733a
authored
Oct 10, 2016
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix negative lengths when the buffer is not none for py27.
parent
b166329e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
src/gevent/_ssl3.py
src/gevent/_ssl3.py
+2
-0
src/gevent/_sslgte279.py
src/gevent/_sslgte279.py
+1
-1
No files found.
src/gevent/_ssl3.py
View file @
044e733a
...
...
@@ -282,6 +282,8 @@ class SSLSocket(socket):
raise
ValueError
(
"Read on closed or unwrapped SSL socket."
)
if
len
==
0
:
return
b''
if
buffer
is
None
else
0
# Negative lengths are handled natively when the buffer is None
# to raise a ValueError
try
:
if
buffer
is
not
None
:
return
self
.
_sslobj
.
read
(
len
,
buffer
)
...
...
src/gevent/_sslgte279.py
View file @
044e733a
...
...
@@ -305,7 +305,7 @@ class SSLSocket(socket):
raise
ValueError
(
"Read on closed or unwrapped SSL socket."
)
if
len
==
0
:
return
b''
if
buffer
is
None
else
0
if
len
<
0
:
if
len
<
0
and
buffer
is
None
:
# This is handled natively in python 2.7.12+
raise
ValueError
(
"Negative read length"
)
try
:
...
...
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