mirror of
https://github.com/python/cpython.git
synced 2025-08-15 14:20:55 +00:00
Merged revisions 77352-77354 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77352 | antoine.pitrou | 2010-01-07 18:46:49 +0100 (jeu., 07 janv. 2010) | 5 lines Issue #7455: Fix possible crash in cPickle on invalid input. Patch by Florent Xicluna. ........ r77353 | antoine.pitrou | 2010-01-07 18:49:37 +0100 (jeu., 07 janv. 2010) | 3 lines Fix attribution. Florent actually repackaged and reviewed Victor's patch (sorry!). ........ r77354 | antoine.pitrou | 2010-01-07 18:54:10 +0100 (jeu., 07 janv. 2010) | 3 lines Fix reattribution mistake when fixing attribution mistake! ........
This commit is contained in:
parent
a507072e54
commit
8dba727ce8
3 changed files with 13 additions and 1 deletions
|
@ -1029,6 +1029,15 @@ class AbstractPickleModuleTests(unittest.TestCase):
|
|||
exec teststr in {'__builtins__': builtins}, d
|
||||
d['f']()
|
||||
|
||||
def test_bad_input(self):
|
||||
# Test issue4298
|
||||
s = '\x58\0\0\0\x54'
|
||||
self.assertRaises(EOFError, self.module.loads, s)
|
||||
# Test issue7455
|
||||
s = '0'
|
||||
# XXX Why doesn't pickle raise UnpicklingError?
|
||||
self.assertRaises((IndexError, cPickle.UnpicklingError),
|
||||
self.module.loads, s)
|
||||
|
||||
class AbstractPersistentPicklerTests(unittest.TestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue