The product uses the getlogin() function in a multithreaded context, potentially causing it to return incorrect values.
Using names for security purposes is not advised. Names are easy to forge and can have overlapping user IDs, potentially causing confusion or impersonation.
Use getlogin_r() instead, which is reentrant, meaning that other processes are locked out from changing the username.
Our security experts can help you identify and remediate CWE-558 vulnerabilities in your codebase.
Get Security Assessment