mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Fix bug in marshal where bad data would cause a segfault due to
lack of an infinite recursion check. Contributed by Damien Miller at Google.
This commit is contained in:
parent
f1135f30f8
commit
b1a9b37aa8
4 changed files with 164 additions and 69 deletions
|
@ -220,6 +220,10 @@ class BugsTestCase(unittest.TestCase):
|
|||
except Exception:
|
||||
pass
|
||||
|
||||
def test_recursion(self):
|
||||
s = 'c' + ('X' * 4*4) + '{' * 2**20
|
||||
self.assertRaises(ValueError, marshal.loads, s)
|
||||
|
||||
def test_main():
|
||||
test_support.run_unittest(IntTestCase,
|
||||
FloatTestCase,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue