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
e545b30f
Unverified
Commit
e545b30f
authored
Jan 25, 2019
by
Salvatore Sanfilippo
Committed by
GitHub
Jan 25, 2019
Browse files
Merge pull request #5801 from soloestoy/fix-getuser-null-pointer
ACL: fix null pointer in getuser
parents
f99e0f59
496497f8
Changes
1
Show whitespace changes
Inline
Side-by-side
src/acl.c
View file @
e545b30f
...
@@ -618,6 +618,11 @@ void aclCommand(client *c) {
...
@@ -618,6 +618,11 @@ void aclCommand(client *c) {
}
}
}
else
if
(
!
strcasecmp
(
sub
,
"getuser"
)
&&
c
->
argc
==
3
)
{
}
else
if
(
!
strcasecmp
(
sub
,
"getuser"
)
&&
c
->
argc
==
3
)
{
user
*
u
=
ACLGetUserByName
(
c
->
argv
[
2
]
->
ptr
,
sdslen
(
c
->
argv
[
2
]
->
ptr
));
user
*
u
=
ACLGetUserByName
(
c
->
argv
[
2
]
->
ptr
,
sdslen
(
c
->
argv
[
2
]
->
ptr
));
if
(
u
==
NULL
)
{
addReplyNull
(
c
);
return
;
}
addReplyMapLen
(
c
,
2
);
addReplyMapLen
(
c
,
2
);
/* Flags */
/* Flags */
...
...
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