From eb5f1299b2a5d4fa73e8d8b57c9104dedb92d746 Mon Sep 17 00:00:00 2001 From: Jamie Pate Date: Thu, 18 Jul 2024 19:20:17 -0700 Subject: [PATCH] Fix dynamic-stack-buffer-overflow crash when executing random functions on random physics objects Fixes #92333 This looks correct, and fixes the ASAN assertion I'm currently getting in my program. --- scene/3d/physics/rigid_body_3d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/3d/physics/rigid_body_3d.cpp b/scene/3d/physics/rigid_body_3d.cpp index 5ea413f2c46..275e8cd7a92 100644 --- a/scene/3d/physics/rigid_body_3d.cpp +++ b/scene/3d/physics/rigid_body_3d.cpp @@ -249,7 +249,7 @@ void RigidBody3D::_body_state_changed(PhysicsDirectBodyState3D *p_state) { //process additions for (int i = 0; i < toadd_count; i++) { - _body_inout(1, toremove[i].rid, toadd[i].id, toadd[i].shape, toadd[i].local_shape); + _body_inout(1, toadd[i].rid, toadd[i].id, toadd[i].shape, toadd[i].local_shape); } contact_monitor->locked = false;