mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-03 15:55:40 +00:00
In sudo_unsetenv_nodebug(), decrement envp.env_len after removing
the variable. From Paul Zirnik of SUSE.
This commit is contained in:
@@ -497,6 +497,7 @@ sudo_unsetenv_nodebug(const char *var)
|
|||||||
char **cur = ep;
|
char **cur = ep;
|
||||||
while ((*cur = *(cur + 1)) != NULL)
|
while ((*cur = *(cur + 1)) != NULL)
|
||||||
cur++;
|
cur++;
|
||||||
|
env.env_len--;
|
||||||
/* Keep going, could be multiple instances of the var. */
|
/* Keep going, could be multiple instances of the var. */
|
||||||
} else {
|
} else {
|
||||||
ep++;
|
ep++;
|
||||||
|
Reference in New Issue
Block a user