...
Because length
is user controlled, the value could can result in a large block of memory being allocated or cause the call to malloc()
to fail. Depending on how error handling is implemented, this may result in a denial of service or other error. A length
of zero results in a division by zero in the overflow check, which can also result in a denial of service.
...