summaryrefslogtreecommitdiff
path: root/src/debug/HyprCtl.cpp
diff options
context:
space:
mode:
authorMirzaSamadAhmedBaig <89132160+Mirza-Samad-Ahmed-Baig@users.noreply.github.com>2025-07-20 18:31:53 +0500
committerGitHub <noreply@github.com>2025-07-20 15:31:53 +0200
commit503fc458d87728cb9cb3d7acb6f654a2a8b4dc31 (patch)
tree40740ef7ab7cfb0afb6ce24289c861948baa112f /src/debug/HyprCtl.cpp
parenta3d59b525b595f465dd1fe22e66c115d486f503b (diff)
internal: replace unsafe strcpy with snprintf (#11128)
Diffstat (limited to 'src/debug/HyprCtl.cpp')
-rw-r--r--src/debug/HyprCtl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index 15847d18..30126a92 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -2026,7 +2026,7 @@ void CHyprCtl::startHyprCtlSocket() {
m_socketPath = g_pCompositor->m_instancePath + "/.socket.sock";
- strcpy(SERVERADDRESS.sun_path, m_socketPath.c_str());
+ snprintf(SERVERADDRESS.sun_path, sizeof(SERVERADDRESS.sun_path), "%s", m_socketPath.c_str());
if (bind(m_socketFD.get(), (sockaddr*)&SERVERADDRESS, SUN_LEN(&SERVERADDRESS)) < 0) {
Debug::log(ERR, "Couldn't start the Hyprland Socket. (2) IPC will not work.");