Fix Coverity Issue 46/298446/1
authorAnuj Kumar Singh <anujk.singh@samsung.com>
Thu, 7 Sep 2023 05:32:06 +0000 (11:02 +0530)
committerAnuj Kumar Singh <anujk.singh@samsung.com>
Thu, 7 Sep 2023 05:32:06 +0000 (11:02 +0530)
This patch fix the below coverity issue:
CID-1706415

Change-Id: I53383e3a78cfeef03b279c49ad9c4c8f31c95fa8
Signed-off-by: Anuj Kumar Singh <anujk.singh@samsung.com>
bt-service/services/adapter/bt-service-core-adapter-le.c

index 5ff7cd0..807133c 100644 (file)
@@ -946,9 +946,9 @@ static void __bt_le_handle_device_found(event_ble_scan_result_info *scan_result)
        ret_if(NULL == scan_result);
 
        _bt_convert_addr_type_to_string(address, scan_result->address.addr);
-
+       // TODO:  Change BLUETOOTH_ADVERTISING_DATA_LENGTH_MAX to 250 once LE Extended feature is enabled.
        if (scan_result->is_extended) {
-               tmp_str = _bt_service_convert_hex_to_string(scan_result->adv_data, 250);
+               tmp_str = _bt_service_convert_hex_to_string(scan_result->adv_data, BLUETOOTH_ADVERTISING_DATA_LENGTH_MAX);
                g_free(tmp_str);
 
                tmp_str = NULL;