diff options
author | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2014-07-26 16:33:36 -0700 |
---|---|---|
committer | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2014-07-26 16:33:36 -0700 |
commit | 1c423dadf4c4ac1251faa015f14e3fcf55127879 (patch) | |
tree | 9193ede0952e47ee5271a2a98437daebd4d3aac4 /common | |
parent | 119fd3031ce4a71dabb09ae41429776335b2105e (diff) | |
download | xrdp-proprietary-1c423dadf4c4ac1251faa015f14e3fcf55127879.tar.gz xrdp-proprietary-1c423dadf4c4ac1251faa015f14e3fcf55127879.zip |
coverity: copy into fixed sized buffer
Diffstat (limited to 'common')
-rw-r--r-- | common/os_calls.c | 4 |
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 } |