From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 82395452566 for ; Fri, 8 Nov 2019 16:54:21 +0300 (MSK) Received: by mail-lj1-f196.google.com with SMTP id k15so6321053lja.3 for ; Fri, 08 Nov 2019 05:54:21 -0800 (PST) Date: Fri, 8 Nov 2019 16:54:16 +0300 From: Cyrill Gorcunov Message-ID: <20191108135416.GB2875@uranus> References: <20191108133607.15747-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191108133607.15747-1-gorcunov@gmail.com> Subject: [Tarantool-patches] [PATCH] box/console: Fix crash in error message List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml The former message has been dropped by tarantool.org receivers, so lets try to resend... --- When invalid command passed we should print out the excat value, instead due to typo in 96dbc49d097a96af5273cce2b5663db5917f4ea9 we cause a nil dereference. Reported-by: Mergen Imeev Signed-off-by: Cyrill Gorcunov --- src/box/lua/console.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/box/lua/console.lua b/src/box/lua/console.lua index 52df67465..d4d8ec984 100644 --- a/src/box/lua/console.lua +++ b/src/box/lua/console.lua @@ -323,7 +323,7 @@ local function preprocess(storage, line) end if items == nil then local msg = "Invalid command \\%s. Type \\help for help." - return format(false, msg:format(items[1])) + return format(false, msg:format(line)) end return operators[items[1]](storage, unpack(items)) end -- 2.20.1