mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
If realloc of sudoerslval.command.args fails, reset sudoerslval.command.args
as well as arg_len and arg_size after freeing sudoerslval.command.args.
This commit is contained in:
@@ -147,6 +147,8 @@ fill_args(const char *s, size_t len, int addspace)
|
||||
sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory"));
|
||||
sudoerserror(NULL);
|
||||
free(sudoerslval.command.args);
|
||||
sudoerslval.command.args = NULL;
|
||||
arg_len = arg_size = 0;
|
||||
debug_return_bool(false);
|
||||
} else
|
||||
sudoerslval.command.args = p;
|
||||
|
Reference in New Issue
Block a user