Commit c151eb6d authored by antirez's avatar antirez
Browse files

Fix replicationFeedSlaves() off-by-one bug.

This fixes issue #1221.
parent bf56948f
...@@ -188,7 +188,7 @@ void replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) { ...@@ -188,7 +188,7 @@ void replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) {
b[0] = '*'; b[0] = '*';
len = ll2string(b+1,REDIS_LONGSTR_SIZE,argc); len = ll2string(b+1,REDIS_LONGSTR_SIZE,argc);
b += len+1; b += len+1;
buf_left -= len; buf_left -= len+1;
b[0] = '\r'; b[0] = '\r';
b[1] = '\n'; b[1] = '\n';
b += 2; b += 2;
...@@ -219,7 +219,7 @@ void replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) { ...@@ -219,7 +219,7 @@ void replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) {
b[0] = '$'; b[0] = '$';
len = ll2string(b+1,REDIS_LONGSTR_SIZE,objlen); len = ll2string(b+1,REDIS_LONGSTR_SIZE,objlen);
b += len+1; b += len+1;
buf_left -= len; buf_left -= len+1;
b[0] = '\r'; b[0] = '\r';
b[1] = '\n'; b[1] = '\n';
b += 2; b += 2;
......
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