File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,12 +103,8 @@ def test_random(self):
103103 sys .stdout .write ("\n RAND_status is %d (%s)\n "
104104 % (v , (v and "sufficient randomness" ) or
105105 "insufficient randomness" ))
106- try :
107- ssl .RAND_egd (1 )
108- except TypeError :
109- pass
110- else :
111- print ("didn't raise TypeError" )
106+ self .assertRaises (TypeError , ssl .RAND_egd , 1 )
107+ self .assertRaises (TypeError , ssl .RAND_egd , 'foo' , 1 )
112108 ssl .RAND_add ("this is a random string" , 75.0 )
113109
114110 def test_parse_cert (self ):
Original file line number Diff line number Diff line change @@ -154,6 +154,9 @@ Library
154154
155155- Issue #13579: string.Formatter now understands the 'a' conversion specifier.
156156
157+ - Issue #15793: Stack corruption in ssl.RAND_egd().
158+ Patch by Serhiy Storchaka.
159+
157160- Issue #15595: Fix subprocess.Popen(universal_newlines=True)
158161 for certain locales (utf-16 and utf-32 family). Patch by Chris Jerdonek.
159162
Original file line number Diff line number Diff line change @@ -1917,7 +1917,7 @@ PySSL_RAND_egd(PyObject *self, PyObject *args)
19171917 PyObject * path ;
19181918 int bytes ;
19191919
1920- if (!PyArg_ParseTuple (args , "O&|i :RAND_egd" ,
1920+ if (!PyArg_ParseTuple (args , "O&:RAND_egd" ,
19211921 PyUnicode_FSConverter , & path ))
19221922 return NULL ;
19231923
You can’t perform that action at this time.
0 commit comments