Previously, The address of a local stack variable was passed to a new thread. Fix dangling pointer by switching to dynamic allocation. This problem is also known as CVE-2025-25568.