mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 13:28:10 +00:00
NULL-terminate env_add
This commit is contained in:
parent
0494774f30
commit
7ce802792e
@ -128,7 +128,6 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
|
|||||||
int env_size = 32;
|
int env_size = 32;
|
||||||
|
|
||||||
env_add = emalloc2(env_size, sizeof(char *));
|
env_add = emalloc2(env_size, sizeof(char *));
|
||||||
env_add[0] = NULL;
|
|
||||||
|
|
||||||
/* Pass progname to plugin so it can call setprogname() */
|
/* Pass progname to plugin so it can call setprogname() */
|
||||||
sudo_settings[ARG_PROGNAME].value = getprogname();
|
sudo_settings[ARG_PROGNAME].value = getprogname();
|
||||||
@ -296,6 +295,7 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
env_add[nenv] = NULL;
|
||||||
|
|
||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user