diff options
author | Oran Agra <oran@redislabs.com> | 2021-01-01 10:23:30 +0200 |
---|---|---|
committer | Oran Agra <oran@redislabs.com> | 2021-01-12 16:25:37 +0200 |
commit | 23d299234c8618c8d7b0e6f33d931c8f080e6fef (patch) | |
tree | 0295bcace00628685d28b6dc99c1b49f4a744e98 | |
parent | f84c181eac4a1f53eb218588ff2051fc527daf7f (diff) | |
download | redis-23d299234c8618c8d7b0e6f33d931c8f080e6fef.tar.gz |
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.
(cherry picked from commit 152b5d46c4a76f2d16031ef794092bfc8d322f8a)
-rw-r--r-- | src/debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/debug.c b/src/debug.c index 2c0afb870..389b4e36f 100644 --- a/src/debug.c +++ b/src/debug.c @@ -1493,7 +1493,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; |