[Tarantool-patches] [PATCH] box/console: Fix crash in error message

Cyrill Gorcunov gorcunov at gmail.com
Fri Nov 8 16:54:16 MSK 2019


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 <imeevma at tarantool.org>
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 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



More information about the Tarantool-patches mailing list