...
The
getenv
function returns a pointer to a string associated with the matched list member. The string pointed to shall not be modified by the program, but may be overwritten by a subsequent call to thegetenv
function. If the specified name cannot be found, a null pointer is returned.
Consequently, if If the string returned by getenv()
must be altered, a local copy should be created. Altering the string returned by getenv()
results in undefined behavior . See also undefined behavior 184 of Annex J of the C Standard.
...
Altering the string returned by setlocale()
or the structure returned by localeconv()
results in undefined behavior. See also undefined behaviors 120 and 121 of Annex J. Furthermore, the C Standard imposes no requirements on the contents of the string by setlocale()
. Consequently, a program should make no assumptions can be made as to the string's internal contents or structure.
...
Altering the string returned by strerror()
results in undefined behavior. See also undefined behavior 184 of Annex J.
...