box: fix NULL pointer dereference in error_unpack_unsafe
If MP_ERROR map contains two MP_ERROR_STACK keys, then the second call to `error_set_prev(effect, cur)' will crash, because `effect' is NULL, but `err == NULL' is false, because it is assigned on the first iteration. This patch raises an error if more than one MP_ERROR_STACK key is present. NO_DOC=bugfix Closes #9136
Showing
- changelogs/unreleased/gh-9136-null-dereference-in-error_set_prev.md 4 additions, 0 deletions.../unreleased/gh-9136-null-dereference-in-error_set_prev.md
- src/box/mp_error.cc 5 additions, 0 deletionssrc/box/mp_error.cc
- test/app-luatest/msgpack_test.lua 8 additions, 0 deletionstest/app-luatest/msgpack_test.lua
- test/unit/xrow.cc 45 additions, 1 deletiontest/unit/xrow.cc
Loading
Please register or sign in to comment