summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorLaxmikant Rashinkar <LK.Rashinkar@gmail.com>2014-07-26 16:33:36 -0700
committerLaxmikant Rashinkar <LK.Rashinkar@gmail.com>2014-07-26 16:33:36 -0700
commit1c423dadf4c4ac1251faa015f14e3fcf55127879 (patch)
tree9193ede0952e47ee5271a2a98437daebd4d3aac4 /common
parent119fd3031ce4a71dabb09ae41429776335b2105e (diff)
downloadxrdp-proprietary-1c423dadf4c4ac1251faa015f14e3fcf55127879.tar.gz
xrdp-proprietary-1c423dadf4c4ac1251faa015f14e3fcf55127879.zip
coverity: copy into fixed sized buffer
Diffstat (limited to 'common')
-rw-r--r--common/os_calls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/os_calls.c b/common/os_calls.c
index 68a6a5b0..09aa61e8 100644
--- a/common/os_calls.c
+++ b/common/os_calls.c
@@ -777,7 +777,7 @@ g_tcp_local_connect(int sck, const char *port)
memset(&s, 0, sizeof(struct sockaddr_un));
s.sun_family = AF_UNIX;
- strcpy(s.sun_path, port);
+ strncpy(s.sun_path, port, sizeof(s.sun_path));
return connect(sck, (struct sockaddr *)&s, sizeof(struct sockaddr_un));
#endif
}
@@ -937,7 +937,7 @@ g_tcp_local_bind(int sck, const char *port)
memset(&s, 0, sizeof(struct sockaddr_un));
s.sun_family = AF_UNIX;
- strcpy(s.sun_path, port);
+ strncpy(s.sun_path, port, sizeof(s.sun_path));
return bind(sck, (struct sockaddr *)&s, sizeof(struct sockaddr_un));
#endif
}