Fix UAF in animation_tree.cpp (AHashMap realloc)

(cherry picked from commit 164f117c16d59fa201956e0be5da45868e3cae46)
This commit is contained in:
cdemirer
2026-02-06 03:10:15 +03:00
committed by Thaddeus Crews
parent 9a55eb991f
commit 62e80cd894

View File

@@ -739,7 +739,8 @@ void AnimationTree::_animation_node_renamed(const ObjectID &p_oid, const String
for (const PropertyInfo &E : properties) { for (const PropertyInfo &E : properties) {
if (E.name.begins_with(old_base)) { if (E.name.begins_with(old_base)) {
String new_name = E.name.replace_first(old_base, new_base); String new_name = E.name.replace_first(old_base, new_base);
property_map[new_name] = property_map[E.name]; const Pair<Variant, bool> temp_copy = property_map[E.name];
property_map[new_name] = temp_copy;
property_map.erase(E.name); property_map.erase(E.name);
} }
} }