summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_marshal.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_marshal.py b/Lib/test/test_marshal.py
index b62e2d8..f87495b 100644
--- a/Lib/test/test_marshal.py
+++ b/Lib/test/test_marshal.py
@@ -211,6 +211,15 @@ class BugsTestCase(unittest.TestCase):
self.assertEquals(marshal.loads(marshal.dumps(5, 0)), 5)
self.assertEquals(marshal.loads(marshal.dumps(5, 1)), 5)
+ def test_fuzz(self):
+ # simple test that it's at least not *totally* trivial to
+ # crash from bad marshal data
+ for c in [chr(i) for i in range(256)]:
+ try:
+ marshal.loads(c)
+ except Exception:
+ pass
+
def test_main():
test_support.run_unittest(IntTestCase,
FloatTestCase,