# HG changeset patch # User Todd C. Miller # Date 1484590376 25200 # Node ID 3d87a008671c73ff8c058ce8576cc791d50086cc # Parent 5323dfcfb009a2436bf7bd867e4d308e0935356b In sudo_unsetenv_nodebug(), decrement envp.env_len after removing the variable. From Paul Zirnik of SUSE. diff -r 5323dfcfb009 -r 3d87a008671c plugins/sudoers/env.c --- a/plugins/sudoers/env.c Sun Jan 15 19:13:26 2017 -0700 +++ b/plugins/sudoers/env.c Mon Jan 16 11:12:56 2017 -0700 @@ -497,6 +497,7 @@ char **cur = ep; while ((*cur = *(cur + 1)) != NULL) cur++; + env.env_len--; /* Keep going, could be multiple instances of the var. */ } else { ep++;