Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] box/console: Fix crash in error message
@ 2019-11-08 13:36 Cyrill Gorcunov
  2019-11-08 13:54 ` Cyrill Gorcunov
  0 siblings, 1 reply; 4+ messages in thread
From: Cyrill Gorcunov @ 2019-11-08 13:36 UTC (permalink / raw)
  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 <imeevma@tarantool.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-08 21:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 13:36 [Tarantool-patches] [PATCH] box/console: Fix crash in error message Cyrill Gorcunov
2019-11-08 13:54 ` Cyrill Gorcunov
2019-11-08 21:44   ` Alexander Turenko
2019-11-08 21:46     ` Cyrill Gorcunov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox