Commit 49128f0b authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

Fix bug in gluing a deferred multi bulk length to the next reply chunk

parent 3ab20376
...@@ -253,9 +253,9 @@ void setDeferredMultiBulkLength(redisClient *c, void *node, long length) { ...@@ -253,9 +253,9 @@ void setDeferredMultiBulkLength(redisClient *c, void *node, long length) {
if (ln->next != NULL) { if (ln->next != NULL) {
next = listNodeValue(ln->next); next = listNodeValue(ln->next);
/* Only glue when the next node is an sds */ /* Only glue when the next node is non-NULL (an sds in this case) */
if (next->ptr != NULL) { if (next->ptr != NULL) {
len->ptr = sdscat(len->ptr,next->ptr); len->ptr = sdscatlen(len->ptr,next->ptr,sdslen(next->ptr));
listDelNode(c->reply,ln->next); listDelNode(c->reply,ln->next);
} }
} }
......
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