From 152b5d46c4a76f2d16031ef794092bfc8d322f8a Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Fri, 1 Jan 2021 10:23:30 +0200 Subject: [PATCH] Crash log would crash half way on commands with no arguments (#8260) The crash log attempts to print the current client info, and when it does that it attempts to check if the first argument happens to be a key but it did so for commands with no arguments too, which caused the crash log to crash half way and not reach its end. --- src/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debug.c b/src/debug.c index f95aaba0d..de6e8c13a 100644 --- a/src/debug.c +++ b/src/debug.c @@ -1569,7 +1569,7 @@ void logCurrentClient(void) { } /* Check if the first argument, usually a key, is found inside the * selected DB, and if so print info about the associated object. */ - if (cc->argc >= 1) { + if (cc->argc > 1) { robj *val, *key; dictEntry *de;