-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Potentially) incorrect use of getenv function #2152
Comments
maxirmx
added a commit
that referenced
this issue
Nov 18, 2023
Merged
maxirmx
added a commit
that referenced
this issue
Dec 6, 2023
maxirmx
added a commit
that referenced
this issue
Dec 6, 2023
maxirmx
added a commit
that referenced
this issue
Dec 6, 2023
maxirmx
added a commit
that referenced
this issue
Dec 6, 2023
ronaldtse
pushed a commit
that referenced
this issue
Dec 8, 2023
ni4
pushed a commit
that referenced
this issue
May 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
getenv function is not required to be thread-safe.
Another call to getenv, as well as a call to the POSIX functions setenv(), unsetenv(), and putenv()
may invalidate the pointer returned by a previous call or modify the string obtained from a previous call.
Sample incorrect use, cause memory corruption on Windows
in TEST_F(rnp_tests, test_cli_logname)
Sample correct use:
TEST_F(rnp_tests, test_ffi_set_log_fd)
getenv is used in 8 cpp files. Needs review.
The text was updated successfully, but these errors were encountered: