Rectify size passed to copy service name to security records
Use case: Services having name length greater than max length always take new slot in security records. After few enable disable cycles in BLE ON scenario, the record gets completely occupied making further connection impossible. Steps: 1. Install a BLE App to create BLE always ON scenario. 2. Run a few cycles of Bluetooth(BREDR) enable-disable. Failure: Once security records are completely occupied, new connections are not possible because of socket creation failure due to unavailability of security id. Root cause: Size passed to copy service name does not include bit for null termination. So, for services having name size greater than that size have their last bit truncated for null termination. During next enable, the comparison with same size always fails causing service to take new slot in security records array. Fix: Increased the size passed to copy service name by 1 after considering null termination. Change-Id: I3527df6610932f60fd85bcdd14d5b8a527c79722
Loading
Please register or sign in to comment