vinyl: init all vars before cleanup in vy_lsm_split_range()
If vy_key_from_msgpack() fails in vy_lsm_split_range(), clean-up procedure is called. However, at this moment struct vy_range *parts[2] is not initialized ergo contains garbage and access to this structure may result in crash, segfault or disk formatting. Let's move initialization of mentioned variables before call of vy_lsm_split_range(). Part of #4864
Showing
- src/box/vy_lsm.c 2 additions, 2 deletionssrc/box/vy_lsm.c
- src/box/vy_stmt.c 10 additions, 0 deletionssrc/box/vy_stmt.c
- src/lib/core/errinj.h 1 addition, 0 deletionssrc/lib/core/errinj.h
- test/box/errinj.result 1 addition, 0 deletionstest/box/errinj.result
- test/vinyl/gh-4864-stmt-alloc-fail-compact.result 123 additions, 0 deletionstest/vinyl/gh-4864-stmt-alloc-fail-compact.result
- test/vinyl/gh-4864-stmt-alloc-fail-compact.test.lua 55 additions, 0 deletionstest/vinyl/gh-4864-stmt-alloc-fail-compact.test.lua
- test/vinyl/suite.ini 1 addition, 1 deletiontest/vinyl/suite.ini
Loading
Please register or sign in to comment