You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use 'environ' C extern for environment variables (except Mac OS)
The function __fort_getenv uses the C extern
variable environ to get the values of the environment
variables. What's happening is 'environ' is getting
reallocated, but this code caches a value of 'environ'
in a local static pointer 'env' and dereferences
that. The old values in the old copy of 'environ'
that 'env' points to are no longer valid. The code
has been fixed using 'environ' directly rather than
using the local static pointer.
0 commit comments