Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
0752a834
Commit
0752a834
authored
Nov 30, 2017
by
Itamar Haber
Browse files
Check arity in SLOWLOG before accessing arg
parent
51d42c88
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/slowlog.c
View file @
0752a834
...
...
@@ -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."
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment