]> granicus.if.org Git - python/commitdiff
Added test for 85cb90f79cbf and see how the code handles all flags at once
authorChristian Heimes <christian@cheimes.de>
Mon, 10 Sep 2012 12:48:43 +0000 (14:48 +0200)
committerChristian Heimes <christian@cheimes.de>
Mon, 10 Sep 2012 12:48:43 +0000 (14:48 +0200)
Lib/test/test_io.py

index 57353506eae38cb35aed0bf682e6f964a95a28ea..d5eec7c2215f7b835628643bb4de9e0f7d7715de 100644 (file)
@@ -2887,6 +2887,11 @@ class MiscIOTest(unittest.TestCase):
         with self.open(support.TESTFN, 'rb') as f:
             self.assertEqual(b"spam", f.read())
 
+    def test_open_allargs(self):
+        # there used to be a buffer overflow in the parser for rawmode
+        self.assertRaises(ValueError, self.open, support.TESTFN, 'rwax+')
+
+
 class CMiscIOTest(MiscIOTest):
     io = io