Added test for 85cb90f79cbf and see how the code handles all flags at once
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 5735350..d5eec7c 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -2887,6 +2887,11 @@
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