mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Zero out sd_un before calling parse_default() so we don't try
to free stack garbage in the ldap/sssd backends.
This commit is contained in:
@@ -349,6 +349,7 @@ set_default(const char *var, const char *val, int op, const char *file,
|
||||
int idx;
|
||||
debug_decl(set_default, SUDOERS_DEBUG_DEFAULTS)
|
||||
|
||||
memset(&sd_un, 0, sizeof(sd_un));
|
||||
idx = parse_default(var, val, op, &sd_un, file, lineno, quiet);
|
||||
if (idx != -1) {
|
||||
/* Set parsed value in sudo_defs_table and run callback (if any). */
|
||||
@@ -372,6 +373,7 @@ set_early_default(const char *var, const char *val, int op, const char *file,
|
||||
int idx;
|
||||
debug_decl(set_early_default, SUDOERS_DEBUG_DEFAULTS)
|
||||
|
||||
memset(&sd_un, 0, sizeof(sd_un));
|
||||
idx = parse_default(var, val, op, &sd_un, file, lineno, quiet);
|
||||
if (idx != -1) {
|
||||
/* Set parsed value in sudo_defs_table. */
|
||||
|
Reference in New Issue
Block a user