Commit dc78cc6f authored by Neal Norwitz's avatar Neal Norwitz

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.
parent 4043a6bb
......@@ -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,
......
......@@ -413,6 +413,7 @@ Dieter Maurer
Greg McFarlane
Michael McLay
Gordon McMillan
Damien Miller
Jay T. Miller
Chris McDonough
Andrew McNamara
......
......@@ -12,6 +12,9 @@ What's New in Python 2.5.2c1?
Library
-------
- Fix bug in marshal where bad data would cause a segfault due to
lack of an infinite recursion check.
- HTML-escape the plain traceback in cgitb's HTML output, to prevent
the traceback inadvertently or maliciously closing the comment and
injecting HTML into the error page.
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment