[Bf-blender-cvs] [64aa6c68d53] blender-v2.91-release: Fix T81817: use-after-free when trying to open file from splash screen

Jacques Lucke noreply at git.blender.org
Mon Nov 16 11:30:46 CET 2020


Commit: 64aa6c68d5324f30338172316643b8a50b0971b9
Author: Jacques Lucke
Date:   Mon Nov 16 11:30:24 2020 +0100
Branches: blender-v2.91-release
https://developer.blender.org/rB64aa6c68d5324f30338172316643b8a50b0971b9

Fix T81817: use-after-free when trying to open file from splash screen

The issues was that Blender was trying to refresh the
splash screen region. However, opening the file browser
closed the splash screen and freed the region.

The fix is to simply not refresh the region.

Has been approved in T81817.

===================================================================

M	source/blender/windowmanager/intern/wm_splash_screen.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_splash_screen.c b/source/blender/windowmanager/intern/wm_splash_screen.c
index ec1c4440474..d732393b631 100644
--- a/source/blender/windowmanager/intern/wm_splash_screen.c
+++ b/source/blender/windowmanager/intern/wm_splash_screen.c
@@ -72,12 +72,6 @@ static void wm_block_close(bContext *C, void *arg_block, void *UNUSED(arg))
   UI_popup_block_close(C, win, arg_block);
 }
 
-static void wm_block_splash_refreshmenu(bContext *C, void *UNUSED(arg_block), void *UNUSED(arg))
-{
-  ARegion *region_menu = CTX_wm_menu(C);
-  ED_region_tag_refresh_ui(region_menu);
-}
-
 static void wm_block_splash_add_label(uiBlock *block, const char *label, int x, int y)
 {
   if (!(label && label[0])) {
@@ -217,7 +211,6 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *region, void *UNUSE
       block, ibuf, 0, 0.5f * U.widget_unit, splash_width, splash_height, NULL);
 
   UI_but_func_set(but, wm_block_close, block, NULL);
-  UI_block_func_set(block, wm_block_splash_refreshmenu, block, NULL);
 
   wm_block_splash_add_label(
       block, BKE_blender_version_string(), splash_width, splash_height - 13.0 * U.dpi_fac);



More information about the Bf-blender-cvs mailing list