summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/capi-media-camera.spec2
-rw-r--r--src/camera.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec
index 84971c5..c69fa5d 100644
--- a/packaging/capi-media-camera.spec
+++ b/packaging/capi-media-camera.spec
@@ -1,6 +1,6 @@
Name: capi-media-camera
Summary: A Camera API
-Version: 0.2.71
+Version: 0.2.72
Release: 0
Group: Multimedia/API
License: Apache-2.0
diff --git a/src/camera.c b/src/camera.c
index 6fcde32..b71ac92 100644
--- a/src/camera.c
+++ b/src/camera.c
@@ -1543,7 +1543,7 @@ static void *_camera_msg_handler_func(gpointer data)
cam_idle_event->event = cam_msg->event;
cam_idle_event->cb_info = cb_info;
g_mutex_init(&cam_idle_event->event_mutex);
- memcpy(cam_idle_event->recv_msg, cam_msg->recv_msg, sizeof(cam_idle_event->recv_msg));
+ strncpy(cam_idle_event->recv_msg, cam_msg->recv_msg, sizeof(cam_idle_event->recv_msg) - 1);
/*LOGD("t:%d add camera event[%d, %p] to IDLE", type, event, cam_idle_event);*/
@@ -1685,7 +1685,7 @@ static void __camera_add_msg_to_queue(camera_cb_info_s *cb_info, int api, int ev
cam_msg->event = event;
cam_msg->event_class = event_class;
- memcpy(cam_msg->recv_msg, msg, sizeof(cam_msg->recv_msg));
+ strncpy(cam_msg->recv_msg, msg, sizeof(cam_msg->recv_msg) - 1);
/*LOGD("add camera message to queue : api %d, event %d, event_class %d", api, event, event_class);*/