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:
@@ -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++;
|
||||
|
Reference in New Issue
Block a user