mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Fix sudoers garbage collection and run it in policy fuzzer.
This commit is contained in:
@@ -607,6 +607,7 @@ sudoers_policy_store_result(bool accepted, char *argv[], char *envp[],
|
||||
command_info = calloc(55, sizeof(char *));
|
||||
if (command_info == NULL)
|
||||
goto oom;
|
||||
sudoers_gc_add(GC_VECTOR, command_info);
|
||||
|
||||
if (safe_cmnd != NULL) {
|
||||
command_info[info_len] = sudo_new_key_val("command", safe_cmnd);
|
||||
@@ -877,10 +878,6 @@ sudoers_policy_store_result(bool accepted, char *argv[], char *envp[],
|
||||
}
|
||||
#endif /* HAVE_SELINUX */
|
||||
|
||||
/* Free on exit; they are not available in the close function. */
|
||||
sudoers_gc_add(GC_VECTOR, envp);
|
||||
sudoers_gc_add(GC_VECTOR, command_info);
|
||||
|
||||
/* Fill in exec environment info. */
|
||||
*(exec_args->argv) = argv;
|
||||
*(exec_args->envp) = envp;
|
||||
|
Reference in New Issue
Block a user