Hi,
I am getting security threat in below code for lecore.m class https://github.com/LogentriesCommunity/le_ios/blob/master/lelib/lecore.m
There are 3 occurrences of "memcpy()" method which is an insecure function acc to security tool.
In void le_log(const char message)* method, there are 2 occurences-
- memcpy(buffer, le_token, token_length);
- memcpy(buffer + token_length + 1, message, length);
In void le_write_string(NSString string)* method , there is a line
3. memcpy(buffer, le_token, token_length);
Below is the issue description and reference links from security team.
Issue description : Use of insecure functions/potential dangerous functions
Reference link: https://cwe.mitre.org/data/definitions/676.html
This would explain why SECURITY TEAM is recommending the change of these functions.
Please provide solution for this as soon as possible as it is very urgent.
Thanks and Regards,
Priya Mehndiratta