summaryrefslogtreecommitdiff
path: root/src/ipc/media-thumb-ipc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipc/media-thumb-ipc.c')
-rwxr-xr-xsrc/ipc/media-thumb-ipc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/ipc/media-thumb-ipc.c b/src/ipc/media-thumb-ipc.c
index 6b63959..5faed91 100755
--- a/src/ipc/media-thumb-ipc.c
+++ b/src/ipc/media-thumb-ipc.c
@@ -534,8 +534,6 @@ int _media_thumb_request(int msg_type, const char *origin_path, char *thumb_path
req_msg.msg_type = msg_type;
req_msg.uid = uid;
SAFE_STRLCPY(req_msg.org_path, origin_path, sizeof(req_msg.org_path));
- req_msg.org_path[strlen(req_msg.org_path)] = '\0';
-
req_msg.origin_path_size = strlen(req_msg.org_path) + 1;
req_msg.dest_path_size = strlen(req_msg.dst_path) + 1;
req_msg.thumb_size = 0;
@@ -586,7 +584,7 @@ int _media_thumb_request(int msg_type, const char *origin_path, char *thumb_path
return recv_msg.status;
}
- strncpy(thumb_path, recv_msg.dst_path, max_length);
+ SAFE_STRLCPY(thumb_path, recv_msg.dst_path, max_length);
return MS_MEDIA_ERR_NONE;
}
@@ -755,7 +753,6 @@ int _media_thumb_send_request()
req_msg.request_id = 0;
req_msg.uid = req_manager->uid;
SAFE_STRLCPY(req_msg.org_path, req_manager->path, sizeof(req_msg.org_path));
- req_msg.org_path[strlen(req_msg.org_path)] = '\0';
req_msg.dst_path[0] = '\0';
req_msg.origin_path_size = strlen(req_msg.org_path) + 1;
req_msg.dest_path_size = 1;
@@ -873,7 +870,6 @@ int _media_thumb_raw_data_send_request()
req_msg.uid = req_manager->uid;
SAFE_STRLCPY(req_msg.org_path, req_manager->path, sizeof(req_msg.org_path));
- req_msg.org_path[strlen(req_msg.org_path)] = '\0';
req_msg.dst_path[0] = '\0';
req_msg.origin_path_size = strlen(req_msg.org_path) + 1;