diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-05-16 20:05:11 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-05-16 20:05:11 (GMT) |
commit | b1a9b37aa836f1c0f827b16cebdd23dfe19fcf4c (patch) | |
tree | f69f0ae562a44947f5734763f19f6101df6477b6 /Lib | |
parent | f1135f30f8c2b6d1d6a875135de37d04c030e071 (diff) | |
download | cpython-b1a9b37aa836f1c0f827b16cebdd23dfe19fcf4c.zip cpython-b1a9b37aa836f1c0f827b16cebdd23dfe19fcf4c.tar.gz cpython-b1a9b37aa836f1c0f827b16cebdd23dfe19fcf4c.tar.bz2 |
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.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_marshal.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_marshal.py b/Lib/test/test_marshal.py index f87495b..bfdd274 100644 --- a/Lib/test/test_marshal.py +++ b/Lib/test/test_marshal.py @@ -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, |