diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-06-11 19:50:30 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-06-11 19:50:30 (GMT) |
commit | b72e6860d800dea696f541e6490c5ee08aeee14c (patch) | |
tree | bb4338353723e43df5d3bccb4dc8e92696fbe725 /Lib/test/test_struct.py | |
parent | 2e5416d0e68ed9526ec11de053c3cfeaffdb0620 (diff) | |
download | cpython-b72e6860d800dea696f541e6490c5ee08aeee14c.zip cpython-b72e6860d800dea696f541e6490c5ee08aeee14c.tar.gz cpython-b72e6860d800dea696f541e6490c5ee08aeee14c.tar.bz2 |
Fix more undefined-behaviour inducing overflow checks in struct module.
Diffstat (limited to 'Lib/test/test_struct.py')
-rw-r--r-- | Lib/test/test_struct.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py index 70eed6e..d574bd7 100644 --- a/Lib/test/test_struct.py +++ b/Lib/test/test_struct.py @@ -510,6 +510,8 @@ class StructTest(unittest.TestCase): hugecount = '{}b'.format(sys.maxsize+1) self.assertRaises(struct.error, struct.calcsize, hugecount) + hugecount2 = '{}b{}H'.format(sys.maxsize//2, sys.maxsize//2) + self.assertRaises(struct.error, struct.calcsize, hugecount2) if IS32BIT: def test_crasher(self): |