Skip to content
Snippets Groups Projects
Commit d4531aa2 authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Fix possible integer overflow in mp_check()

Malformed MessagePack can cause `int k` counter overflow
inside mp_check()/mp_next().

See https://github.com/tarantool/nginx_upstream_module/issues/79
See https://github.com/rtsisyk/msgpuck/issues/16
Closes #2540
parent 70b2b92d
No related branches found
No related tags found
No related merge requests found
Subproject commit 2598bce249077ca49ba311247e03b2a10558bbbb
Subproject commit 40e24ccf3ec191e6f576da967a64630ca2160bfc
1..19
1..20
1..135
# *** test_uints ***
# uint 0U
......@@ -1816,3 +1816,11 @@ ok 18 - subtests
ok 96 - mp_read_double(mp_encode_strl(100)) check pos unchanged
# *** test_numbers: done ***
ok 19 - subtests
1..4
# *** test_overflow ***
ok 1 - mp_check array overflow
ok 2 - mp_check map overflow
ok 3 - mp_check str overflow
ok 4 - mp_check bin overflow
# *** test_overflow: done ***
ok 20 - subtests
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment