Security threat due to insecure function "malloc()" in GCDAsyncSocket.m

https://github.com/robbiehanson/CocoaAsyncSocket/blob/master/Source/GCD/GCDAsyncUdpSocket.m
I am getting security threat in GCDAsyncUdpSocke.m class file 

There is occurrences of malloc() function which is an insecure function acc to security tool.

void *buf = malloc(bufSize);
void *buf = malloc(bufSize);

Below is the issue description and reference links from security team.
Issue description:   Use of insecure functions/potential dangerous functions
Reference links:   CWE-676: Use of Potentially Dangerous Function
CWE-789 - Uncontrolled Memory Allocation 

This would explain why SECURITY TEAM is recommending the change of these functions.

Thanks and Regards

Security threat due to insecure function malloc() in GCDAsyncSocket.m

You’ve asked many questions that all have the same answer. I’m going to respond on this one.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@apple.com"

Security threat due to insecure function "malloc()" in GCDAsyncSocket.m
 
 
Q