mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-23 05:43:17 +00:00
segfault fixed when data is unpacked using list_hook,
this bug is a twin to #28. Unit-test is also attached.
This commit is contained in:
parent
4ea952f39d
commit
cf89f18be7
3 changed files with 11 additions and 1 deletions
|
|
@ -62,5 +62,13 @@ def test_an_exception_in_objecthook1():
|
|||
packed = packb({1: {'__complex__': True, 'real': 1, 'imag': 2}})
|
||||
unpackb(packed, object_hook=bad_complex_decoder)
|
||||
|
||||
|
||||
@raises(DecodeError)
|
||||
def test_an_exception_in_objecthook2():
|
||||
packed = packb({1: [{'__complex__': True, 'real': 1, 'imag': 2}]})
|
||||
unpackb(packed, list_hook=bad_complex_decoder, use_list=1)
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue