[tarantool-patches] Re: [PATCH v2] sql: display decoded msgpack for EXPLAIN queries

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Fri Feb 22 18:07:51 MSK 2019

On 15/02/2019 20:37, Nikita Pettik wrote:
> During DDL routines we pass encoded space/index/trigger formats
> into msgpack to VDBE. EXPLAIN query displays arguments of each opcode of
> VDBE program in a readable format. So, lets decode arguments of OP_Blob
> opcode with subtype = _MSGPACK before displaying them. Also, lets
> enlarge static buffers for P4 operand value and opcode comment to fit
> decoded msgpack.
> What is more, it fixes buffer-overflow since before this patch operands
> of OP_Blob were treated as strings and passed to functions like strlen()
> (only during EXPLAIN query). On the other hand, generally speaking
> msgpack can come without null termination, or contain '\0' symbols in
> the middle of encoded array.
> Closes #3868
> ---
> Branch: https://github.com/tarantool/tarantool/tree/np/gh-3868-buffer-overflow-v2
> Issue: https://github.com/tarantool/tarantool/issues/3868


More information about the Tarantool-patches mailing list