Unverified Commit e545b30f authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
Browse files

Merge pull request #5801 from soloestoy/fix-getuser-null-pointer

ACL: fix null pointer in getuser
parents f99e0f59 496497f8
...@@ -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 */
......
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