summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaejeong Kim <backto.kim@samsung.com>2015-12-21 08:27:04 (GMT)
committerHaejeong Kim <backto.kim@samsung.com>2015-12-21 08:27:29 (GMT)
commitdfe5f0c2f20434b774a4163a098616aac188ce43 (patch)
tree26e591e0a1ce9e31cb1a0bf8f0f600d4a76697e2
parentd38ae2b8148701f2e31e94bb92af2c541134de25 (diff)
downloadlibmedia-thumbnail-dfe5f0c2f20434b774a4163a098616aac188ce43.zip
libmedia-thumbnail-dfe5f0c2f20434b774a4163a098616aac188ce43.tar.gz
libmedia-thumbnail-dfe5f0c2f20434b774a4163a098616aac188ce43.tar.bz2
Change-Id: Icdcb33e7770c85a2a6b5cdd50fc4707f12f1bb45
-rwxr-xr-xserver/thumb-server-dcm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/thumb-server-dcm.c b/server/thumb-server-dcm.c
index 8554ed4..0df64b2 100755
--- a/server/thumb-server-dcm.c
+++ b/server/thumb-server-dcm.c
@@ -425,7 +425,7 @@ static int __thumb_server_dcm_create_socket(int *socket_fd, thumb_server_dcm_por
memset(&serv_addr, 0, sizeof(serv_addr));
serv_addr.sun_family = AF_UNIX;
unlink(DCM_IPC_PATH[port]);
- strcpy(serv_addr.sun_path, DCM_IPC_PATH[port]);
+ strncpy(serv_addr.sun_path, DCM_IPC_PATH[port], strlen(DCM_IPC_PATH[port]));
/* Bind socket to local address */
for (i = 0; i < 20; i++) {
@@ -556,7 +556,7 @@ int _thumb_server_dcm_send_msg(thumb_server_dcm_ipc_msg_type_e msg_type, uid_t u
/* Set dcm thread socket address */
memset(&serv_addr, 0, sizeof(serv_addr));
serv_addr.sun_family = AF_UNIX;
- strcpy(serv_addr.sun_path, DCM_IPC_PATH[port]);
+ strncpy(serv_addr.sun_path, DCM_IPC_PATH[port], strlen(DCM_IPC_PATH[port]));
/* Connect to the socket */
if (connect(socket_fd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0) {