From 9b142c33f3ebd91955e965d4e1d00906a4c9dde4 Mon Sep 17 00:00:00 2001 From: TheTurtle Date: Mon, 28 Oct 2024 01:26:01 +0200 Subject: [PATCH] pthread_spec: Zero initialize array --- src/core/libraries/kernel/threads/pthread_spec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/libraries/kernel/threads/pthread_spec.cpp b/src/core/libraries/kernel/threads/pthread_spec.cpp index fe6f3513..3d6b0f4d 100644 --- a/src/core/libraries/kernel/threads/pthread_spec.cpp +++ b/src/core/libraries/kernel/threads/pthread_spec.cpp @@ -102,7 +102,7 @@ int PS4_SYSV_ABI posix_pthread_setspecific(PthreadKeyT key, const void* value) { Pthread* pthread = g_curthread; if (!pthread->specific) { - pthread->specific = new PthreadSpecificElem[PthreadKeysMax]; + pthread->specific = new PthreadSpecificElem[PthreadKeysMax]{}; if (!pthread->specific) { return POSIX_ENOMEM; }