diff options
Diffstat (limited to 'hiredis.c')
-rw-r--r-- | hiredis.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -174,6 +174,7 @@ static void *createArrayObject(const redisReadTask *task, size_t elements) { return NULL; if (elements > 0) { + if (SIZE_MAX / sizeof(redisReply*) < elements) return NULL; /* Don't overflow */ r->element = hi_calloc(elements,sizeof(redisReply*)); if (r->element == NULL) { freeReplyObject(r); |