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
39f5c071
Commit
39f5c071
authored
Dec 12, 2016
by
Salvatore Sanfilippo
Committed by
GitHub
Dec 12, 2016
Browse files
Merge pull request #3680 from yossigo/fix_rediscli_command_crash
Fix redis-cli rare crash.
parents
978a790b
b6ab4d04
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
39f5c071
...
@@ -275,6 +275,10 @@ static void cliIntegrateHelp(void) {
...
@@ -275,6 +275,10 @@ static void cliIntegrateHelp(void) {
* don't already match what we have. */
* don't already match what we have. */
for (size_t j = 0; j < reply->elements; j++) {
for (size_t j = 0; j < reply->elements; j++) {
redisReply *entry = reply->element[j];
redisReply *entry = reply->element[j];
if (entry->type != REDIS_REPLY_ARRAY || entry->elements < 4 ||
entry->element[0]->type != REDIS_REPLY_STRING ||
entry->element[1]->type != REDIS_REPLY_INTEGER ||
entry->element[3]->type != REDIS_REPLY_INTEGER) return;
char *cmdname = entry->element[0]->str;
char *cmdname = entry->element[0]->str;
int i;
int i;
...
...
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