Re:OpenBSD may soon gain further memory protections: immutab...
by staticassertion on Monday September 05, 2022 @03:37PM
(#32728404)
I never called it undefined behavior. But you shouldn't modify that stack space directly, you should either use setenv via libc or you should use prctl.
What do you mean by "insane" here? In standard C you get char** argv, and the arguments live on the stack. I believe you are allowed to modify those cli arguments through the pointers, it is not undefined behavior.