mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +00:00
Fix more undefined-behaviour inducing overflow checks in struct module.
This commit is contained in:
parent
2e5416d0e6
commit
b72e6860d8
2 changed files with 25 additions and 19 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue