The "how" might be a mistaken use of putenv() in which the caller has forgotten that the parameter string needs to live forever.
The "how" might be a mistaken use of putenv() in which the caller has forgotten that the parameter string needs to live forever.