From f69d5835b8237a5d508625e14d8615262f319024 Mon Sep 17 00:00:00 2001 From: chaoticgd <43898262+chaoticgd@users.noreply.github.com> Date: Thu, 21 Nov 2024 11:15:18 +0000 Subject: [PATCH] PINE: Fix stack buffer overflow for long XDG_RUNTIME_DIR paths --- pcsx2/PINE.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcsx2/PINE.cpp b/pcsx2/PINE.cpp index 6103c0a64e5da..a7bf73af01d60 100644 --- a/pcsx2/PINE.cpp +++ b/pcsx2/PINE.cpp @@ -306,7 +306,7 @@ bool PINEServer::Initialize(int slot) return false; } server.sun_family = AF_UNIX; - strcpy(server.sun_path, m_socket_name.c_str()); + StringUtil::Strlcpy(server.sun_path, m_socket_name, sizeof(server.sun_path)); // we unlink the socket so that when releasing this thread the socket gets // freed even if we didn't close correctly the loop