2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

In sudo_unsetenv_nodebug(), decrement envp.env_len after removing

the variable.  From Paul Zirnik of SUSE.
This commit is contained in:
Todd C. Miller
2017-01-16 11:12:56 -07:00
parent 1a59ab8b74
commit deb4c3b19c

View File

@@ -497,6 +497,7 @@ sudo_unsetenv_nodebug(const char *var)
char **cur = ep;
while ((*cur = *(cur + 1)) != NULL)
cur++;
env.env_len--;
/* Keep going, could be multiple instances of the var. */
} else {
ep++;