mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Check arity in SLOWLOG before accessing arg
This commit is contained in:
parent
51d42c88a6
commit
0752a834f9
@ -140,7 +140,7 @@ void slowlogReset(void) {
|
||||
/* The SLOWLOG command. Implements all the subcommands needed to handle the
|
||||
* Redis slow log. */
|
||||
void slowlogCommand(client *c) {
|
||||
if (!strcasecmp(c->argv[1]->ptr,"help") && c->argc == 2) {
|
||||
if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) {
|
||||
const char *help[] = {
|
||||
"get [count] -- Return the top entries from the slowlog (default: 10).",
|
||||
"len -- Return the length of the slowlog.",
|
||||
|
Loading…
x
Reference in New Issue
Block a user