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
727dd436
Commit
727dd436
authored
Jan 18, 2018
by
antirez
Browse files
Fix migrateCommand() access of not initialized byte.
parent
fd8efb7c
Changes
1
Show whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
727dd436
...
@@ -5086,12 +5086,15 @@ try_again:
...
@@ -5086,12 +5086,15 @@ try_again:
socket_error = 1;
socket_error = 1;
break;
break;
}
}
if
(
buf0
[
0
]
==
'-'
||
(
select
&&
buf1
[
0
]
==
'-'
)
||
buf2
[
0
]
==
'-'
)
{
if ((password && buf0[0] == '-') ||
(select && buf1[0] == '-') ||
buf2[0] == '-')
{
/* On error assume that last_dbid is no longer valid. */
/* On error assume that last_dbid is no longer valid. */
if (!error_from_target) {
if (!error_from_target) {
cs->last_dbid = -1;
cs->last_dbid = -1;
char *errbuf;
char *errbuf;
if
(
buf0
[
0
]
==
'-'
)
errbuf
=
buf0
;
if (
password &&
buf0[0] == '-') errbuf = buf0;
else if (select && buf1[0] == '-') errbuf = buf1;
else if (select && buf1[0] == '-') errbuf = buf1;
else errbuf = buf2;
else errbuf = buf2;
...
...
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