Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bdc6000e authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "HID [ASan]: Fix for heap buffer overflow issue."

parents f7df33e0 7d28b14f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -537,7 +537,8 @@ bt_status_t btif_hh_virtual_unplug(const RawAddress* bd_addr) {
  p_dev = btif_hh_find_dev_by_bda(*bd_addr);
  if ((p_dev != NULL) && (p_dev->dev_status == BTHH_CONN_STATE_CONNECTED) &&
      (p_dev->attr_mask & HID_VIRTUAL_CABLE)) {
    BTIF_TRACE_DEBUG("%s Sending BTA_HH_CTRL_VIRTUAL_CABLE_UNPLUG", __func__);
    BTIF_TRACE_DEBUG("%s: Sending BTA_HH_CTRL_VIRTUAL_CABLE_UNPLUG for: %s", __func__,
                     bd_addr->ToString().c_str());
    /* start the timer */
    btif_hh_start_vup_timer(bd_addr);
    p_dev->local_vup = true;
@@ -545,7 +546,8 @@ bt_status_t btif_hh_virtual_unplug(const RawAddress* bd_addr) {
    return BT_STATUS_SUCCESS;
  } else if ((p_dev != NULL) &&
             (p_dev->dev_status == BTHH_CONN_STATE_CONNECTED)) {
    BTIF_TRACE_ERROR("%s: Virtual unplug not suported, disconnecting device");
    BTIF_TRACE_ERROR("%s: Virtual unplug not suported, disconnecting device: %s",
                     __func__, bd_addr->ToString().c_str());
    /* start the timer */
    btif_hh_start_vup_timer(bd_addr);
    p_dev->local_vup = true;