summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordh79pyun <dh79.pyun@samsung.com>2021-12-14 07:25:23 +0900
committerdh79pyun <dh79.pyun@samsung.com>2021-12-14 07:26:34 +0900
commitaf01dc7c58998bbedb850e081dee6af4a52f849d (patch)
treedc3049b526d1f01dbfd22e092e7ea7ed3d333e58
parent05b409d662428c4bfd9417f161619a2dcb58c6ab (diff)
downloadzigbee-manager-tizen_7.0.tar.gz
zigbee-manager-tizen_7.0.tar.bz2
zigbee-manager-tizen_7.0.zip
Change-Id: I14661e0e5b7b27d1895b0ee385362cb55b4bcdaa Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
-rw-r--r--zigbee-daemon/zigbee-lib/src/zblib_request.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/zigbee-daemon/zigbee-lib/src/zblib_request.c b/zigbee-daemon/zigbee-lib/src/zblib_request.c
index c73206f..f40dbd7 100644
--- a/zigbee-daemon/zigbee-lib/src/zblib_request.c
+++ b/zigbee-daemon/zigbee-lib/src/zblib_request.c
@@ -1483,7 +1483,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req
/* Copy data */
for (i = 0; i < (in_req->attribute_id_len * sizeof(short)); i++)
Z_LOGE("in_req->attribute_id[%d] = 0x%X", i, in_req->attribute_id[i]);
- req->attribute_id = g_memdup(in_req->attribute_id,
+ req->attribute_id = g_memdup2(in_req->attribute_id,
in_req->attribute_id_len * sizeof(short));
req->attribute_id_len = in_req->attribute_id_len;
req->node_id = in_req->node_id;
@@ -1507,7 +1507,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req
g_malloc0(sizeof(ZigbeeZclGlobalControlWriteAttributesRequest_t));
/* Copy data */
- req->write_records = g_memdup(in_req->write_records, in_req->records_len);
+ req->write_records = g_memdup2(in_req->write_records, in_req->records_len);
req->records_len = in_req->records_len;
req->node_id = in_req->node_id;
req->cluster_id = in_req->cluster_id;
@@ -1531,7 +1531,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req
g_malloc0(sizeof(ZigbeeZclGlobalControlWriteAttributesUndividedRequest_t));
/* Copy data */
- req->write_records = g_memdup(in_req->write_records, in_req->records_len);
+ req->write_records = g_memdup2(in_req->write_records, in_req->records_len);
req->records_len = in_req->records_len;
req->node_id = in_req->node_id;
req->cluster_id = in_req->cluster_id;
@@ -1555,7 +1555,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req
g_malloc0(sizeof(ZigbeeZclGlobalControlWriteAttributesNoResponse_t));
/* Copy data */
- req->write_records = g_memdup(in_req->write_records, in_req->records_len);
+ req->write_records = g_memdup2(in_req->write_records, in_req->records_len);
req->records_len = in_req->records_len;
req->node_id = in_req->node_id;
req->cluster_id = in_req->cluster_id;
@@ -1579,7 +1579,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req
g_malloc0(sizeof(ZigbeeZclGlobalControlWriteAttributesStructed_t));
/* Copy data */
- req->write_records = g_memdup(in_req->write_records, in_req->records_len);
+ req->write_records = g_memdup2(in_req->write_records, in_req->records_len);
req->records_len = in_req->records_len;
req->node_id = in_req->node_id;
req->cluster_id = in_req->cluster_id;
@@ -1603,7 +1603,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req
g_malloc0(sizeof(ZigbeeZclGlobalControlReadAttributesStructed_t));
/* Copy data */
- req->read_records = g_memdup(in_req->read_records, in_req->records_len);
+ req->read_records = g_memdup2(in_req->read_records, in_req->records_len);
req->records_len = in_req->records_len;
req->node_id = in_req->node_id;
req->cluster_id = in_req->cluster_id;
@@ -1627,7 +1627,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req
g_malloc0(sizeof(ZigbeeZclGlobalControlConfigureReportingReq_t));
/* Copy data */
- req->read_records = g_memdup(in_req->read_records, in_req->records_len);
+ req->read_records = g_memdup2(in_req->read_records, in_req->records_len);
req->records_len = in_req->records_len;
req->node_id = in_req->node_id;
req->cluster_id = in_req->cluster_id;
@@ -1651,7 +1651,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req
g_malloc0(sizeof(ZigbeeZclGlobalControlReadConfigureReporting_t));
/* Copy data */
- req->read_records = g_memdup(in_req->read_records, in_req->records_len);
+ req->read_records = g_memdup2(in_req->read_records, in_req->records_len);
req->records_len = in_req->records_len;
req->node_id = in_req->node_id;
req->cluster_id = in_req->cluster_id;
@@ -2181,7 +2181,7 @@ static gpointer __zblib_request_create_zcl_group_request_data(guint request_type
req->node_id = in_req->node_id;
req->dest_ep = in_req->dest_ep;
req->group_count = in_req->group_count;
- req->group_list = (gushort *)g_memdup(in_req->group_list,
+ req->group_list = (gushort *)g_memdup2(in_req->group_list,
sizeof(gushort) * in_req->group_count);
}
@@ -2385,7 +2385,7 @@ static gpointer __zblib_request_create_zcl_scene_request_data(guint request_type
g_strlcpy(req->scene_name,
in_req->scene_name, ZIGBEE_ZCL_SCENE_NAME_MAX_LEN + 1);
req->ext_field_set_len = in_req->ext_field_set_len;
- req->ext_field_set = (guchar *)g_memdup(in_req->ext_field_set,
+ req->ext_field_set = (guchar *)g_memdup2(in_req->ext_field_set,
in_req->ext_field_set_len);
}