mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
action: fix UAF when using prompt during reconfigure
Reported-by: @jlindgren90 Fixes #3106
This commit is contained in:
parent
c9030dcc5b
commit
94c980c6be
3 changed files with 13 additions and 0 deletions
|
|
@ -867,6 +867,15 @@ cleanup:
|
|||
buf_reset(&command);
|
||||
}
|
||||
|
||||
void
|
||||
action_prompts_destroy(void)
|
||||
{
|
||||
struct action_prompt *prompt, *tmp;
|
||||
wl_list_for_each_safe(prompt, tmp, &prompts, link) {
|
||||
action_prompt_destroy(prompt);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
action_check_prompt_result(pid_t pid, int exit_code)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -78,6 +78,9 @@
|
|||
static void
|
||||
reload_config_and_theme(struct server *server)
|
||||
{
|
||||
/* Avoid UAF when dialog client is used during reconfigure */
|
||||
action_prompts_destroy();
|
||||
|
||||
scaled_buffer_invalidate_sharing();
|
||||
rcxml_finish();
|
||||
rcxml_read(rc.config_file);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue