...
However, after the loop ends, path
will have been modified to look like this: "/usr/bin\0/bin\0/usr/sbin\0/sbin\0"
. This is an issue on several levels. If we check our The local path
variable , we will only see becomes /usr/bin
now. Even worse, we have unintentionally changed the environment variable PATH has been unintentionally changed, which could cause unintended results.
...