summaryrefslogtreecommitdiff
path: root/mate-session
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-04-28 12:57:27 +0800
committerraveit65 <[email protected]>2019-05-02 11:55:27 +0200
commitd3228db51671eb93fdfdca28cf729c11df3300ca (patch)
tree4292ab268330adb91c8e067e4dad6832d98b07bf /mate-session
parent6f5ef63a09af855794bcb32a95b2884fd80e1eaa (diff)
downloadmate-session-manager-d3228db51671eb93fdfdca28cf729c11df3300ca.tar.bz2
mate-session-manager-d3228db51671eb93fdfdca28cf729c11df3300ca.tar.xz
[Security] Use 'g_strlcpy' instead of 'strcpy'
Diffstat (limited to 'mate-session')
-rw-r--r--mate-session/mdm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mate-session/mdm.c b/mate-session/mdm.c
index bbb40eb..2e0e712 100644
--- a/mate-session/mdm.c
+++ b/mate-session/mdm.c
@@ -266,11 +266,11 @@ static gboolean mdm_init_protocol_connection(MdmProtocolData* data)
if (g_file_test(MDM_PROTOCOL_SOCKET_PATH, G_FILE_TEST_EXISTS))
{
- strcpy(addr.sun_path, MDM_PROTOCOL_SOCKET_PATH);
+ g_strlcpy (addr.sun_path, MDM_PROTOCOL_SOCKET_PATH, sizeof (addr.sun_path));
}
else if (g_file_test("/tmp/.mdm_socket", G_FILE_TEST_EXISTS))
{
- strcpy(addr.sun_path, "/tmp/.mdm_socket");
+ g_strlcpy (addr.sun_path, "/tmp/.mdm_socket", sizeof (addr.sun_path));
}
else
{