提交 13f7ade5 编写于 作者: A antirez

Fix replicationFeedSlaves() off-by-one bug.

This fixes issue #1221.
上级 78644f5e
......@@ -188,7 +188,7 @@ void replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) {
b[0] = '*';
len = ll2string(b+1,REDIS_LONGSTR_SIZE,argc);
b += len+1;
buf_left -= len;
buf_left -= len+1;
b[0] = '\r';
b[1] = '\n';
b += 2;
......@@ -218,7 +218,7 @@ void replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) {
b[0] = '$';
len = ll2string(b+1,REDIS_LONGSTR_SIZE,objlen);
b += len+1;
buf_left -= len;
buf_left -= len+1;
b[0] = '\r';
b[1] = '\n';
b += 2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册