From b27f388344860394d02e988aa2a6c79b15a4a85a Mon Sep 17 00:00:00 2001 From: Diego Bendersky Date: Mon, 5 Aug 2019 17:35:50 -0300 Subject: [PATCH] pass len to alloc in clusterManagerMigrateKeysInReply --- src/redis-cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redis-cli.c b/src/redis-cli.c index e363a2795..904339857 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -3222,7 +3222,7 @@ static redisReply *clusterManagerMigrateKeysInReply(clusterManagerNode *source, redisReply *entry = reply->element[i]; size_t idx = i + offset; assert(entry->type == REDIS_REPLY_STRING); - argv[idx] = (char *) sdsnew(entry->str); + argv[idx] = (char *) sdsnewlen(entry->str, entry->len); argv_len[idx] = entry->len; if (dots) dots[i] = '.'; }