[Bf-blender-cvs] [460c9d3d92e] master: Fix use-after-free in asset library storage destruction

Julian Eisel noreply at git.blender.org
Wed Nov 2 11:57:26 CET 2022


Commit: 460c9d3d92e9f74254d58c6bb07d7e4fcb53e8b7
Author: Julian Eisel
Date:   Wed Nov 2 11:50:42 2022 +0100
Branches: master
https://developer.blender.org/rB460c9d3d92e9f74254d58c6bb07d7e4fcb53e8b7

Fix use-after-free in asset library storage destruction

Would only appear when more than 4 asset libraries were loaded, because
small buffer optimization would hide the issue.

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

M	source/blender/editors/asset/intern/asset_list.cc

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

diff --git a/source/blender/editors/asset/intern/asset_list.cc b/source/blender/editors/asset/intern/asset_list.cc
index 01a6dc46c48..bb72c5cc1bb 100644
--- a/source/blender/editors/asset/intern/asset_list.cc
+++ b/source/blender/editors/asset/intern/asset_list.cc
@@ -351,7 +351,7 @@ void AssetListStorage::fetch_library(const AssetLibraryReference &library_refere
 
 void AssetListStorage::destruct()
 {
-  global_storage().~AssetListMap();
+  global_storage().clear();
 }
 
 AssetList *AssetListStorage::lookup_list(const AssetLibraryReference &library_ref)



More information about the Bf-blender-cvs mailing list