From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 7372624615 for ; Mon, 25 Feb 2019 06:28:34 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BFhr427VYLmi for ; Mon, 25 Feb 2019 06:28:34 -0500 (EST) Received: from smtp20.mail.ru (smtp20.mail.ru [94.100.179.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 30EED2415D for ; Mon, 25 Feb 2019 06:28:34 -0500 (EST) Date: Mon, 25 Feb 2019 14:28:31 +0300 From: Kirill Yukhin Subject: [tarantool-patches] Re: [PATCH v2] sql: display decoded msgpack for EXPLAIN queries Message-ID: <20190225112831.zx5ouo7h4by2hikj@tarantool.org> References: <20190215173727.88956-1-korablev@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190215173727.88956-1-korablev@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: v.shpilevoy@tarantool.org, Nikita Pettik Hello, On 15 Feb 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 Your patch was checked into 2.1 branch few days ago. -- Regards, Kirill Yukhin