Matthew Martin wrote: > Duplicate environment variables have been a source of bugs, so perhaps > the kernel should fail an execve with an invalid envp. Diff below checks > that each environment string contains a '=' and that there are no > duplicates up to the equals sign.
It's not really the kernel's job to save you from yourself. Also, you're adding a n^2 loop in the kernel, which is not good.
