Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cf93649

Browse files
Fix overallocation in directed cluster MULTIBULK handling.
Addresses #1611
1 parent b565c84 commit cf93649

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cluster_library.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ cluster_read_sock_resp(RedisSock *redis_sock, REDIS_REPLY_TYPE type,
239239
case TYPE_MULTIBULK:
240240
r->elements = len;
241241
if (len != (size_t)-1) {
242-
r->element = ecalloc(len, sizeof(clusterReply*)*len);
242+
r->element = ecalloc(len, sizeof(clusterReply*));
243243
cluster_multibulk_resp_recursive(redis_sock, len, r->element,
244244
line_reply != NULL, &err);
245245
}

0 commit comments

Comments
 (0)