Commit 23d29923 authored by Oran Agra's avatar Oran Agra
Browse files

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 152b5d46)
parent f84c181e
...@@ -1493,7 +1493,7 @@ void logCurrentClient(void) { ...@@ -1493,7 +1493,7 @@ void logCurrentClient(void) {
} }
/* Check if the first argument, usually a key, is found inside the /* Check if the first argument, usually a key, is found inside the
* selected DB, and if so print info about the associated object. */ * selected DB, and if so print info about the associated object. */
if (cc->argc >= 1) { if (cc->argc > 1) {
robj *val, *key; robj *val, *key;
dictEntry *de; dictEntry *de;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment