mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
MERGE: Closes #15793: Stack corruption in ssl.RAND_egd()
This commit is contained in:
commit
b7a2800831
3 changed files with 6 additions and 7 deletions
|
@ -125,12 +125,8 @@ class BasicSocketTests(unittest.TestCase):
|
||||||
else:
|
else:
|
||||||
self.assertRaises(ssl.SSLError, ssl.RAND_bytes, 16)
|
self.assertRaises(ssl.SSLError, ssl.RAND_bytes, 16)
|
||||||
|
|
||||||
try:
|
self.assertRaises(TypeError, ssl.RAND_egd, 1)
|
||||||
ssl.RAND_egd(1)
|
self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
|
||||||
except TypeError:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
print("didn't raise TypeError")
|
|
||||||
ssl.RAND_add("this is a random string", 75.0)
|
ssl.RAND_add("this is a random string", 75.0)
|
||||||
|
|
||||||
def test_parse_cert(self):
|
def test_parse_cert(self):
|
||||||
|
|
|
@ -210,6 +210,9 @@ Library
|
||||||
|
|
||||||
- Issue #13579: string.Formatter now understands the 'a' conversion specifier.
|
- Issue #13579: string.Formatter now understands the 'a' conversion specifier.
|
||||||
|
|
||||||
|
- Issue #15793: Stack corruption in ssl.RAND_egd().
|
||||||
|
Patch by Serhiy Storchaka.
|
||||||
|
|
||||||
- Issue #15595: Fix subprocess.Popen(universal_newlines=True)
|
- Issue #15595: Fix subprocess.Popen(universal_newlines=True)
|
||||||
for certain locales (utf-16 and utf-32 family). Patch by Chris Jerdonek.
|
for certain locales (utf-16 and utf-32 family). Patch by Chris Jerdonek.
|
||||||
|
|
||||||
|
|
|
@ -2481,7 +2481,7 @@ PySSL_RAND_egd(PyObject *self, PyObject *args)
|
||||||
PyObject *path;
|
PyObject *path;
|
||||||
int bytes;
|
int bytes;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "O&|i:RAND_egd",
|
if (!PyArg_ParseTuple(args, "O&:RAND_egd",
|
||||||
PyUnicode_FSConverter, &path))
|
PyUnicode_FSConverter, &path))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue