Fix the memset size errors 65/132865/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 8 Jun 2017 04:55:09 +0000 (13:55 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 8 Jun 2017 04:55:09 +0000 (13:55 +0900)
Change-Id: I022f15c8f8a0c9c7fa3afe835c78010b9cece3d2
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-service-emul/bt-service-dpm.c
bt-service-emul/bt-service-util.c
bt-service/bt-service-util.c

index 42dee1009ba13286ca7963f7177cc12b6f90e708..71e43dfaaac5d28a2a1fa6fd432c55b8036991f1 100644 (file)
@@ -173,7 +173,7 @@ dpm_result_t _bt_dpm_get_bluetooth_devices_from_blacklist(GArray **out_param1)
        if (list) {
                ret = DPM_RESULT_SUCCESS;
                for (; list; list = list->next, i++) {
-                       memset(device_list.addresses[i].addr, 0, BT_ADDRESS_STRING_SIZE);
+                       memset(device_list.addresses[i].addr, 0, BLUETOOTH_ADDRESS_LENGTH);
                        _bt_convert_addr_string_to_type(device_list.addresses[i].addr, list->data);
                }
                device_list.count = g_slist_length(policy_table[DPM_POLICY_BLUETOOTH_DEVICES_BLACKLIST].list);
index a8f97299a66146294de78d617dfd0dcc0102d018..1021aeb5e7f4b2b2bf9acf0f964170430d2f0332 100644 (file)
@@ -35,7 +35,7 @@ static gboolean req_id_used[BT_REQUEST_ID_RANGE_MAX];
 void _bt_init_request_id(void)
 {
        assigned_id = 0;
-       memset(req_id_used, 0x00, BT_REQUEST_ID_RANGE_MAX);
+       memset(req_id_used, 0x00, sizeof(req_id_used));
 }
 
 int _bt_assign_request_id(void)
index 7a8f80502a163af312be053e5eb62d48ff700204..7878d7727475b10afe18d3e8e423cf7152ceb91c 100644 (file)
@@ -38,7 +38,7 @@ bt_plugin_info_t *headed_plugin_info = NULL;
 void _bt_init_request_id(void)
 {
        assigned_id = 0;
-       memset(req_id_used, 0x00, BT_REQUEST_ID_RANGE_MAX);
+       memset(req_id_used, 0x00, sizeof(req_id_used));
 }
 
 int _bt_assign_request_id(void)