CVE-2021-32756

This commit is contained in:
KIMDONGYEON00 2025-07-15 01:32:06 +09:00 committed by GitHub
parent f1e83d5240
commit 190e956e01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -194,6 +194,7 @@ static void *createArrayObject(const redisReadTask *task, size_t elements) {
return NULL; return NULL;
if (elements > 0) { if (elements > 0) {
if (SIZE_MAX / sizeof(redisReply*) < elements) return NULL; /* Don't overflow */
r->element = hi_calloc(elements,sizeof(redisReply*)); r->element = hi_calloc(elements,sizeof(redisReply*));
if (r->element == NULL) { if (r->element == NULL) {
freeReplyObject(r); freeReplyObject(r);