diff --git a/src/networking.c b/src/networking.c index df30206a3..b81060cbb 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1851,7 +1851,7 @@ int processMultibulkBuffer(client *c) { c->qb_pos = 0; /* Hint the sds library about the amount of bytes this string is * going to contain. */ - c->querybuf = sdsMakeRoomFor(c->querybuf,ll+2); + c->querybuf = sdsMakeRoomFor(c->querybuf,ll+2-sdslen(c->querybuf)); } } c->bulklen = ll;