mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-15 23:29:56 +00:00
CVE-2021-32756
This commit is contained in:
parent
f1e83d5240
commit
190e956e01
1 changed files with 1 additions and 0 deletions
1
third_party/hiredis/hiredis.c
vendored
1
third_party/hiredis/hiredis.c
vendored
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue