Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael-grunder <michael.grunder@gmail.com>2019-07-31 07:11:06 +0300
committerMichael Grunder <michael.grunder@gmail.com>2019-07-31 23:41:06 +0300
commitcf93649ec14d52115082d97436ec9a66e816fdd0 (patch)
tree4bfd52a12447bee0947f1e60683512b19afdd195 /cluster_library.c
parentb565c84f13bd757de50c3da720a6822333d6f471 (diff)
Fix overallocation in directed cluster MULTIBULK handling.
Addresses #1611
Diffstat (limited to 'cluster_library.c')
-rw-r--r--cluster_library.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cluster_library.c b/cluster_library.c
index 7d1e99a2..64166cc6 100644
--- a/cluster_library.c
+++ b/cluster_library.c
@@ -239,7 +239,7 @@ cluster_read_sock_resp(RedisSock *redis_sock, REDIS_REPLY_TYPE type,
case TYPE_MULTIBULK:
r->elements = len;
if (len != (size_t)-1) {
- r->element = ecalloc(len, sizeof(clusterReply*)*len);
+ r->element = ecalloc(len, sizeof(clusterReply*));
cluster_multibulk_resp_recursive(redis_sock, len, r->element,
line_reply != NULL, &err);
}