From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) (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 6BAB7452566 for ; Fri, 8 Nov 2019 16:36:19 +0300 (MSK) Received: by mail-lj1-f193.google.com with SMTP id m9so6226858ljh.8 for ; Fri, 08 Nov 2019 05:36:19 -0800 (PST) From: Cyrill Gorcunov Date: Fri, 8 Nov 2019 16:36:07 +0300 Message-Id: <20191108133607.15747-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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