From 0d9e9eda9d4e980ad49548c22ab1d2e3ec9f9ca0 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 1 Jul 2019 14:52:26 +0200 Subject: [PATCH] Avoid use-after-free/double-free with tic-tac-toe (Bug #15649) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clicking on the easter egg “tic-tac-toe” would crash the panel. Avoid the use-after-free/double-free by not destroying the dialog in the email hook. Signed-off-by: Olivier Fourdan Signed-off-by: Olivier Fourdan --- panel/panel-dialogs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/panel-dialogs.c b/panel/panel-dialogs.c index 84dd27ee..2349dbbf 100644 --- a/panel/panel-dialogs.c +++ b/panel/panel-dialogs.c @@ -48,7 +48,7 @@ panel_dialogs_show_about_email_hook (GtkAboutDialog *dialog, /* open tic-tac-toe */ panel_tic_tac_toe_show (); /* close the about dialog as its modality will otherwise prevent you from playing */ - gtk_widget_destroy (GTK_WIDGET (dialog)); + gtk_widget_hide (GTK_WIDGET (dialog)); return TRUE; } else if (!gtk_show_uri_on_window (GTK_WINDOW (dialog), -- 2.18.1