Commit 727dd436 authored by antirez's avatar antirez
Browse files

Fix migrateCommand() access of not initialized byte.

parent fd8efb7c
......@@ -5086,12 +5086,15 @@ try_again:
socket_error = 1;
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. */
if (!error_from_target) {
cs->last_dbid = -1;
char *errbuf;
if (buf0[0] == '-') errbuf = buf0;
if (password && buf0[0] == '-') errbuf = buf0;
else if (select && buf1[0] == '-') errbuf = buf1;
else errbuf = buf2;
......
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