mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
#3694: fix an "XXX undetected error" leak in struct.
This commit is contained in:
parent
c8dcfb6cec
commit
75c3d6ff09
2 changed files with 5 additions and 1 deletions
|
@ -524,6 +524,10 @@ class StructTest(unittest.TestCase):
|
|||
self.assertRaises(struct.error, s.pack_into, small_buf, 0, test_string)
|
||||
self.assertRaises(struct.error, s.pack_into, small_buf, 2, test_string)
|
||||
|
||||
# Test bogus offset (issue 3694)
|
||||
sb = small_buf
|
||||
self.assertRaises(TypeError, struct.pack_into, b'1', sb, None)
|
||||
|
||||
def test_pack_into_fn(self):
|
||||
test_string = b'Reykjavik rocks, eow!'
|
||||
writable_buf = array.array('b', b' '*100)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue